/**
 * Comment & Reply Styles
 * কমেন্ট এবং রিপ্লাই স্টাইল - মূল প্যানেলের মতো একই
 */

/* ==================== COMMENT ACTIONS ==================== */

.comment-actions-row,
.reply-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 4px 0;
}

/* Comment/Reply Action Buttons - Same as Main Panel */
.comment-action-btn,
.reply-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 6px;
    color: #65676b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.comment-action-btn:hover,
.reply-action-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* Like Button Active State - Blue Border Only (Same as Main Panel) */
.comment-action-btn.like-comment-btn.active,
.reply-action-btn.like-reply-btn.active {
    border-color: #1877f2;
    color: #1877f2;
    background: transparent;
}

/* Dislike Button Active State - Red Border Only (Same as Main Panel) */
.comment-action-btn.dislike-comment-btn.active,
.reply-action-btn.dislike-reply-btn.active {
    border-color: #e74c3c;
    color: #e74c3c;
    background: transparent;
}

/* Icon Styles */
.comment-action-btn i,
.reply-action-btn i {
    font-size: 14px;
    color: #65676b;
}

.comment-action-btn.active i,
.reply-action-btn.active i {
    color: inherit;
}

/* Action Count */
.action-count {
    font-size: 11px;
    font-weight: 600;
    margin-left: 2px;
}

/* ==================== COMMENT BUBBLE ==================== */

.facebook-comment-item,
.facebook-reply-item {
    margin-bottom: 12px;
}

.comment-main,
.reply-main {
    display: flex;
    gap: 8px;
}

.comment-avatar,
.reply-avatar {
    flex-shrink: 0;
}

/* Comment Avatar - 36px with lighter shadow */
.comment-avatar {
    width: 36px;
    height: 36px;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Reply Avatar - 28px with lighter shadow */
.reply-avatar {
    width: 28px;
    height: 28px;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.comment-content,
.reply-content {
    flex: 1;
    min-width: 0;
}

.comment-bubble,
.reply-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
}

.comment-header,
.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.comment-author,
.reply-author {
    font-weight: 600;
    font-size: 13px;
    color: #050505;
}

.comment-time,
.reply-time {
    font-size: 11px;
    color: #65676b;
}

.comment-text,
.reply-text {
    font-size: 14px;
    color: #050505;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* ==================== REPLY INPUT ==================== */

.reply-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-left: 44px; /* Updated for 36px comment avatar */
}

.reply-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.reply-form {
    flex: 1;
}

.reply-input-group {
    display: flex;
    background: #f0f2f5;
    border-radius: 18px;
    padding: 6px 10px;
    align-items: flex-end;
    gap: 6px;
    transition: all 0.2s ease;
}

.reply-input-group:focus-within {
    background: #e4e6ea;
}

.reply-textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 13px;
    line-height: 1.4;
    max-height: 80px;
    overflow-y: auto;
}

.reply-textarea:focus {
    outline: none;
}

.reply-submit-btn {
    background: #1877f2;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reply-submit-btn:hover:not(:disabled) {
    background: #166fe5;
}

.reply-submit-btn:disabled {
    background: #e4e6eb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==================== COMMENT REPLIES ==================== */

.comment-replies {
    margin-left: 44px; /* Updated for 36px comment avatar */
    margin-top: 8px;
}

.facebook-reply-item {
    margin-bottom: 8px;
}

/* ==================== ANIMATIONS ==================== */

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Button click animation */
.comment-action-btn.clicked,
.reply-action-btn.clicked {
    animation: buttonClick 0.3s ease;
}

@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 576px) {
    .comment-action-btn span,
    .reply-action-btn span {
        display: none;
    }
    
    .comment-action-btn,
    .reply-action-btn {
        padding: 4px 6px;
    }
    
    .comment-actions-row,
    .reply-actions-row {
        gap: 4px;
    }
}

/* ==================== MENU STYLES ==================== */

.comment-menu-wrapper,
.reply-menu-wrapper {
    position: relative;
    display: inline-block;
}

.comment-menu,
.reply-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    padding: 4px 0;
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.comment-menu.show,
.reply-menu.show {
    display: block;
}

.comment-menu-item,
.reply-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #050505;
    transition: background 0.2s ease;
}

.comment-menu-item:hover,
.reply-menu-item:hover {
    background: #f0f2f5;
}

.comment-menu-item i,
.reply-menu-item i {
    font-size: 16px;
    color: #65676b;
}

/* ==================== EMOJI PICKER IN REPLY ==================== */

.reply-emoji-reaction-wrapper {
    position: relative;
    display: inline-flex;
}

.reply-emoji-btn {
    background: none;
    border: none;
    color: #65676b;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-emoji-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #1877f2;
}

.reply-circular-emoji-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Add padding to create hover bridge */
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.reply-emoji-reaction-wrapper:hover .reply-circular-emoji-menu {
    pointer-events: auto;
    opacity: 1;
    /* No rotation - static menu for better UX */
}

/* Keep menu visible when hovering over it */
.reply-circular-emoji-menu:hover {
    opacity: 1;
    pointer-events: auto;
}

.reply-emoji-option {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    transform: scale(0) translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    left: 50%;
    bottom: 0;
    font-size: 14px;
}

/* Individual emoji hover - stops rotation and scales up */
.reply-emoji-option:hover {
    transform: scale(1.4) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    z-index: 10;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #1877f2;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-option {
    opacity: 1;
    transform: scale(1);
}

/* Emoji positions */
.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-1 {
    transform: translate(-50%, -50px) scale(1);
    transition-delay: 0.05s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-2 {
    transform: translate(calc(-50% - 45px), -25px) scale(1);
    transition-delay: 0.08s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-3 {
    transform: translate(calc(-50% + 45px), -25px) scale(1);
    transition-delay: 0.11s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-4 {
    transform: translate(calc(-50% - 50px), 0px) scale(1);
    transition-delay: 0.14s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-5 {
    transform: translate(calc(-50% + 50px), 0px) scale(1);
    transition-delay: 0.17s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-6 {
    transform: translate(calc(-50% - 45px), 25px) scale(1);
    transition-delay: 0.20s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-7 {
    transform: translate(calc(-50% + 45px), 25px) scale(1);
    transition-delay: 0.23s;
}

.reply-emoji-reaction-wrapper:hover .reply-emoji-opt-8 {
    transform: translate(-50%, 50px) scale(1);
    transition-delay: 0.26s;
}

/* Slow rotation animation */
@keyframes slowRotate {
    from {
        transform: translateX(-50%) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}
