/**
 * SECTION: INTERACTION BAR
 * Purely handles the icons and their animations.
 */


.rc-interaction-item,
.rc-comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    text-decoration: none;
}

/* Icon Sizing & High-End Pop Animation */
.rc-icon-svg {
    width: 24px;
    height: 24px;
    color: var(--accent) !important;
    filter: drop-shadow(0 0 4px var(--accent-glow));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.rc-interaction-item:hover .rc-icon-svg,
.rc-comment-toggle:hover .rc-icon-svg {
    transform: scale(1.2) rotate(-8deg);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.rc-count-val {
    color: #262626;
    font-size: 14px;
    font-weight: 500;
}

.rc-count-val b {
    font-weight: 700;
}

/**
 * SECTION: COMPACT INTERACTIONS
 */
.rc-feed-interactions {
    padding: 10px 15px 5px;
    display: flex;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}


.rc-icon-svg {
    width: 22px;
    /* Smaller icons for better fit */
    height: 22px;
}

.rc-post-caption {
    padding: 0 16px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #262626;
    background: #fff;
    word-wrap: break-word;
    /* Prevents text from pushing layout */
}




/**
 * SECTION: COMPACT "INSTA-GLASS" RESPOND UI
 * Pinned at the bottom with a frosted glow.
 */
.rc-comment-footer#respond {
    flex-shrink: 0;
    /* FIX: Footer NEVER hides */
    padding: 12px 15px;
    background: #fff;
    border-top: 1px solid #efefef;
    z-index: 10;
    margin: 0 !important;
    margin-top: auto;
}

#rc-feed-comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 1px 12px;
    border-radius: 20px;
    /* Pill Shape */
    border: 1px solid #e2e8f0;
}

#rc-feed-comment-form input#comment {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 13px;
    background: transparent;
}

.rc-post-btn {
    background: none !important;
    border: none !important;
    color: var(--accent) !important;
    font-weight: 700;
    cursor: pointer;
}

/* Styled Cancel Badge */
.rc-cancel-reply {
    display: inline-flex;
    background: #fee2e2;
    color: #ef4444 !important;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-decoration: none;
}

/**
 * SECTION: SMART CLOSE BUTTON
 * Hidden on Laptop sidebar, visible only on Mobile drawer.
 */

/* 1. Base State: Hide everywhere by default */
.rc-drawer-close {
    display: none !important;
}

/* 2. MOBILE VIEW: Show ONLY when the drawer is active */
@media (max-width: 1024px) {
    #rc-comment-drawer.is-active .rc-drawer-close {
        display: block !important;
        /* Override the hide only when active */
        background: none;
        border: none;
        font-size: 24px;
        color: #64748b;
        cursor: pointer;
        padding: 5px;
        line-height: 1;
        transition: color 0.2s ease;
    }

    .rc-drawer-close:hover {
        color: #ef4444;
    }
}

/* 3. LAPTOP VIEW: Ensure it never appears in the sidebar */
@media (min-width: 1025px) {
    .rc-drawer-close {
        display: none !important;
        /* Nuclear option for laptop */
    }
}

.rc-comment-text {
    font-size: 12px;
    /* Smaller content font */
    line-height: 1.4;
    color: #475569;
}

/* Internal Column Logic */
.rc-feed-media-col,
.rc-feed-comment-drawer {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-feed-media-col {
    border-right: 1px solid var(--glass-border);
}

.rc-feed-media-col {
    flex: 1;
    min-height: 0;
}

/* MOBILE VIEW: Uses Flex-Scaling to prevent the input from hiding */
@media (max-width: 1024px) {
    .rc-comment-scroll-area {
        flex: 1;
        /* Automatically takes all space except header/footer */
    }

    .rc-feed-comment-drawer,
    .rc-feed-comments-container {
        display: flex !important;
        flex-direction: column !important;
    }
}


.rc-drawer-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 15px 20px;
    /* Tighter header */
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    text-transform: uppercase;
}



/**
 * SECTION 3: THREADED CONTENT UI
 * Styling for the actual comments, avatars, and @mentions.
 */
.rc-comment-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: block;
    padding-bottom: 0px;
    margin-bottom: 0px;
}

.rc-single-comment {
    display: flex;
    gap: 12px;
}

.rc-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent);
}

.rc-comment-author {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    margin-right: 8px;
}

.rc-comment-date {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 10px;
}


/**
 * SECTION: ADAPTIVE SCROLL AREA
 * Uses your preferred 77% for Laptop and Flex-scaling for Mobile.
 */
.rc-comment-scroll-area {
    overflow-y: auto !important;
    /* padding: 10px 15px; */
    min-height: 0 !important;
    -webkit-overflow-scrolling: touch;
}

.rc-comment-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid #efefef;
    background: #fff;
}


/**
 * SECTION 4: MOBILE RESPONSIVENESS
 * Handles the slide-up drawer and prevents header clash.
 */
@media (max-width: 1024px) {

    #rc-comment-drawer {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        /* height: 75vh; */
        /* Stops below site header */
        z-index: 999999 !important;
        background: #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
        transform: translateY(100%);
        transition: transform 0.4s ease-out;

        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        /* This height must match the master grid height */
        height: 580px;
    }

    #rc-comment-drawer.is-active {
        transform: translateY(0);
    }

}


/**
 * SECTION 2: COMMENT DRAWER COMPONENTS
 * Logical structure: Header (Fixed) -> Scroll Area (Flex) -> Footer (Fixed).
 */
.rc-feed-comments-container {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    /* Force it to fill the drawer */
    max-height: 100%;
    /* THE FIX: Stops the height from 'doubling' on submit */
    background: #ffffff;
    overflow: hidden;
    /* Keeps the scroll internal */
    box-sizing: border-box !important;
}

.rc-mention {
    color: #3b82f6;
    font-weight: 600;
    margin-right: 4px;
}

.rc-reply-trigger {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent) !important;
    cursor: pointer;
    text-transform: uppercase;
}


/* Share Button */
/**
 * SECTION: SVG ICON STYLING
 */
.wp-insta-paper-plane {
    width: 20px;
    height: 20px;
    display: block;
    transition: all 0.2s ease;
    color: #64748b;
    /* Default Slate */
}

.wp-share-btn:hover .wp-insta-paper-plane {
    color: var(--accent);
    /* Your theme's violet */
    transform: rotate(-15deg) scale(1.1);
}

/* Success state: Icon turns green when copied */
.wp-share-btn.wp-btn-success .wp-insta-paper-plane {
    color: #10b981;
    /* Emerald Green */
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.4));
}


/* Toastr */
.wp-insta-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.wp-relay-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    transition: color 0.3s ease;
}

.wp-btn-success .wp-relay-count {
    color: #10b981;
}