/* assets/css/comments.css
   Purpose: Rebuilt comments section styles for product-details.php
   Created: 2026-04-14 */

/* ── COMMENTS PANEL OVERRIDES (additive) ── */
.comments-section { position: relative; }

/* ── ELIGIBILITY / BAN BAR ── */
.comment-gate-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
    font-size: 13px; font-weight: 600;
}
.comment-gate-bar.not-eligible {
    background: rgba(77,159,255,0.08);
    border: 1px solid rgba(77,159,255,0.2);
    color: #4D9FFF;
}
.comment-gate-bar.banned {
    background: rgba(246,70,93,0.08);
    border: 1px solid rgba(246,70,93,0.2);
    color: #F6465D;
}
.comment-gate-bar i { font-size: 16px; flex-shrink: 0; }

/* ── COMMENT INPUT ── */
.comment-input-wrap { margin-bottom: 20px; }
.comment-textarea {
    width: 100%; background: #0F1319; color: #E8ECF4;
    border: 1.5px solid rgba(255,255,255,0.07);
    border-radius: 10px; padding: 13px 14px;
    font-family: 'Syne', sans-serif; font-size: 14px;
    resize: none; outline: none; transition: border-color .2s;
    line-height: 1.55;
}
.comment-textarea:focus { border-color: rgba(240,180,41,0.4); }
.comment-textarea::placeholder { color: #606878; }
.comment-input-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px;
}
.comment-char-count { font-size: 11px; color: #606878; font-family: 'IBM Plex Mono', monospace; }
.comment-char-count.warn { color: #F0B429; }
.btn-post-comment {
    background: #F0B429; color: #000;
    font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px;
    padding: 9px 20px; border: none; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    transition: background .2s, opacity .2s;
}
.btn-post-comment:hover:not(:disabled) { background: #FFD97D; }
.btn-post-comment:disabled { opacity: .45; cursor: not-allowed; }

/* ── COMMENT FEED HEADER ── */
.comments-feed-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.comments-count-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    color: #606878;
}
.comments-count-badge .badge-num {
    background: rgba(240,180,41,0.12); color: #F0B429;
    font-family: 'IBM Plex Mono', monospace;
    padding: 2px 8px; border-radius: 100px; font-size: 11px;
}

/* ── COMMENT CARD ── */
.comment-card {
    background: #0F1319;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 16px;
    margin-bottom: 10px;
    transition: border-color .2s;
    animation: cmtFadeIn .3s ease;
}
.comment-card:hover { border-color: rgba(255,255,255,0.1); }
@keyframes cmtFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── COMMENT META ── */
.comment-meta {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.comment-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.comment-username {
    font-size: 13px; font-weight: 700; color: #E8ECF4;
}
.comment-time {
    font-size: 11px; color: #606878;
    font-family: 'IBM Plex Mono', monospace;
}

/* ── COMMENT TEXT ── */
.comment-text {
    font-size: 14px; color: #A0AAB8; line-height: 1.6;
    margin-bottom: 12px; word-break: break-word;
}

/* ── COMMENT ACTIONS ── */
.comment-actions {
    display: flex; align-items: center; gap: 14px;
}
.btn-react {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600;
    background: transparent; border: none; cursor: pointer;
    color: #606878; padding: 4px 10px; border-radius: 6px;
    transition: background .15s, color .15s;
}
.btn-react:hover { background: rgba(255,255,255,0.05); color: #A0AAB8; }
.btn-react.like-active   { color: #0ECB81; background: rgba(14,203,129,0.08); }
.btn-react.dislike-active { color: #F6465D; background: rgba(246,70,93,0.08); }
.btn-react i { font-size: 14px; }

.btn-reply-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: #606878;
    background: transparent; border: none; cursor: pointer;
    padding: 4px 10px; border-radius: 6px;
    transition: background .15s, color .15s;
}
.btn-reply-toggle:hover { background: rgba(255,255,255,0.04); color: #A0AAB8; }

/* ── REPLY SECTION ── */
.reply-section { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.05); }
.reply-section.open { display: block; }

.reply-input-wrap { margin-bottom: 12px; }
.reply-textarea {
    width: 100%; background: #161C26; color: #E8ECF4;
    border: 1.5px solid rgba(255,255,255,0.07);
    border-radius: 8px; padding: 10px 12px;
    font-family: 'Syne', sans-serif; font-size: 13px;
    resize: none; outline: none; transition: border-color .2s;
}
.reply-textarea:focus { border-color: rgba(240,180,41,0.35); }
.reply-textarea::placeholder { color: #606878; }
.btn-post-reply {
    font-size: 12px; font-weight: 700;
    background: rgba(240,180,41,0.12); color: #F0B429;
    border: 1px solid rgba(240,180,41,0.25);
    border-radius: 7px; padding: 6px 14px; cursor: pointer;
    transition: background .2s; float: right; margin-top: 8px;
}
.btn-post-reply:hover { background: rgba(240,180,41,0.22); }

/* ── REPLIES LIST ── */
.replies-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.reply-card {
    background: #161C26;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 9px; padding: 12px 14px;
    border-left: 2px solid rgba(240,180,41,0.2);
    animation: cmtFadeIn .25s ease;
}

/* ── EMPTY STATE ── */
.comments-empty {
    text-align: center; padding: 36px 16px;
    color: #606878; font-size: 14px;
}
.comments-empty i { font-size: 28px; display: block; margin-bottom: 10px; }

/* ── LOADING SKELETON ── */
.comment-skeleton {
    background: linear-gradient(90deg, #0F1319 25%, #161C26 50%, #0F1319 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 12px; height: 90px; margin-bottom: 10px;
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── NEW COMMENTS BANNER ── */
.new-comments-banner {
    position: sticky; bottom: 10px; left: 50%;
    transform: translateX(-50%);
    display: none;
    background: #F0B429; color: #000;
    font-size: 12px; font-weight: 800;
    padding: 8px 20px; border-radius: 100px;
    cursor: pointer; z-index: 50;
    box-shadow: 0 4px 20px rgba(240,180,41,0.35);
    white-space: nowrap;
    align-items: center; gap: 7px;
    width: fit-content;
    margin: 0 auto;
}
.new-comments-banner.visible { display: flex; }

/* ── FLOATING SCROLL BUTTONS ── */
.scroll-float-btns {
    position: fixed; right: 20px; bottom: 80px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 200;
}
.scroll-float-btn {
    width: 38px; height: 38px;
    background: #111722; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s, border-color .2s;
    color: #A0AAB8; font-size: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.scroll-float-btn:hover { background: #161C26; border-color: rgba(255,255,255,0.18); color: #E8ECF4; }

/* ── PROFANITY MODAL ── */
.profanity-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    z-index: 9999; display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.profanity-modal-overlay.open { display: flex; }
.profanity-modal {
    background: #111722; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 32px 28px; max-width: 420px;
    width: calc(100% - 40px); text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.profanity-modal-icon { font-size: 40px; margin-bottom: 14px; }
.profanity-modal-title { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 900; color: #E8ECF4; margin-bottom: 10px; }
.profanity-modal-text  { font-size: 13px; color: #A0AAB8; line-height: 1.6; margin-bottom: 22px; }
.profanity-modal-btn {
    background: #F0B429; color: #000; font-weight: 800; font-size: 14px;
    padding: 11px 28px; border: none; border-radius: 9px; cursor: pointer;
    transition: background .2s;
}
.profanity-modal-btn:hover { background: #FFD97D; }

@media (max-width: 768px) {
    .scroll-float-btns { right: 12px; bottom: 60px; }
}
