/**
 * Xila Voices — CSS
 * File: /wp-content/themes/xila/assets/css/voices.css
 * Prefix: xv-*
 */

/* ───────────── PANEL WRAPPER ───────────── */
#xila-panel-voices {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
}

/* ───────────── TOOLBAR ───────────── */
.xv-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #ede9fe;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 3;
    flex-wrap: wrap;
}
.xv-filters {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.xv-filters::-webkit-scrollbar { display: none; }
.xv-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s;
    line-height: 1.4;
}
.xv-filter-btn:hover { border-color: #7c3aed; color: #6d28d9; background: #faf5ff; }
.xv-filter-btn.is-on {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
    box-shadow: 0 2px 8px rgba(109,40,217,.28);
}
.xv-sort-sel {
    font-size: 11px;
    padding: 4px 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
}
.xv-sort-sel:focus { border-color: #7c3aed; }

/* Compose button */
.xv-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s;
    box-shadow: 0 2px 10px rgba(109,40,217,.35);
}
.xv-compose-btn:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
    box-shadow: 0 4px 16px rgba(109,40,217,.45);
    transform: translateY(-1px);
}

/* ───────────── STATS BAR ───────────── */
.xv-stats-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 13px;
    background: linear-gradient(90deg, #faf5ff, #f5f3ff);
    border-bottom: 1px solid #ede9fe;
    font-size: 10.5px;
    color: #6d28d9;
    font-weight: 700;
    flex-shrink: 0;
}
.xv-stats-bar span { display: flex; align-items: center; gap: 3px; }

/* ───────────── STAGE TRACKER ───────────── */
.xv-stage-tracker {
    margin: 10px 10px 0;
    background: #fff;
    border: 1.5px solid #e0e7ff;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.xv-st-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 13px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
}
.xv-st-title { font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.xv-st-total { font-size: 10px; opacity: .75; }
.xv-st-steps {
    display: flex;
    padding: 10px 8px 8px;
}
.xv-st-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}
.xv-st-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e0e7ff;
    z-index: 0;
}
.xv-st-step.has-data::after { background: #6366f1; }
.xv-st-dot {
    width: 25px; height: 25px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    z-index: 1; position: relative;
    transition: all .2s;
}
.xv-st-step.has-data .xv-st-dot { background: #e0e7ff; border-color: #6366f1; }
.xv-st-lbl { font-size: 9px; color: #94a3b8; margin-top: 4px; line-height: 1.2; }
.xv-st-cnt { font-size: 11px; font-weight: 800; color: #4338ca; }

/* ─────────────  CUT-OFF PREDICTOR ───────────── */
.xv-cutoff-widget {
    margin: 8px 10px 0;
    background: #fff;
    border: 1.5px solid #bae6fd;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.xv-co-head {
    padding: 8px 13px;
    background: linear-gradient(135deg, #0369a1, #0284c7);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.xv-co-head small { font-size: 9.5px; opacity: .7; font-weight: 400; }
.xv-co-body { padding: 6px 12px 8px; }
.xv-co-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f9ff;
    font-size: 11.5px;
}
.xv-co-row:last-child { border-bottom: none; }
.xv-co-cat { font-weight: 700; color: #0c4a6e; width: 58px; flex-shrink: 0; }
.xv-co-bar-wrap { flex: 1; background: #e0f2fe; border-radius: 4px; height: 6px; overflow: hidden; }
.xv-co-bar { height: 100%; background: linear-gradient(90deg, #0284c7, #38bdf8); border-radius: 4px; transition: width .5s ease; }
.xv-co-val { font-size: 11px; font-weight: 700; color: #0369a1; white-space: nowrap; }
.xv-co-n   { font-size: 9.5px; color: #94a3b8; white-space: nowrap; }

/* ───────────── VOICE LIST ───────────── */
.xv-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.xv-list::-webkit-scrollbar { width: 3px; }
.xv-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* ───────────── VOICE CARD ───────────── */
.xv-card {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
    animation: xvSlideIn .2s ease;
}
@keyframes xvSlideIn {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}
.xv-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.xv-resolved { opacity: .82; }

/* Left border accent by type */
.xv--exp   { border-left: 3px solid #f59e0b; }
.xv--q     { border-left: 3px solid #3b82f6; }
.xv--tip   { border-left: 3px solid #10b981; }
.xv--alert { border-left: 3px solid #ef4444; }
.xv--poll  { border-left: 3px solid #8b5cf6; }
.xv--ok    { border-left: 3px solid #22c55e; }
.xv--gr    { border-left: 3px solid #0ea5e9; }
.xv--stage { border-left: 3px solid #6366f1; }

/* Q status strip */
.xv-q-status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.xv-q-status.is-open { background: #eff6ff; color: #1d4ed8; }
.xv-q-status.is-ok   { background: #f0fdf4; color: #15803d; }

.xv-body { padding: 11px 13px 9px; }

/* Meta row */
.xv-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.xv-av {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d28d9, #a78bfa);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}
.xv-meta-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.xv-name { font-size: 12px; font-weight: 700; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xv-time { font-size: 10px; color: #94a3b8; }

/* Type badge */
.xv-badge {
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 6px;
    white-space: nowrap; flex-shrink: 0;
}
.xv-badge.xv--exp   { background:#fef3c7; color:#b45309; }
.xv-badge.xv--q     { background:#eff6ff; color:#1d4ed8; }
.xv-badge.xv--tip   { background:#d1fae5; color:#065f46; }
.xv-badge.xv--alert { background:#fef2f2; color:#dc2626; }
.xv-badge.xv--poll  { background:#ede9fe; color:#5b21b6; }
.xv-badge.xv--ok    { background:#f0fdf4; color:#15803d; }
.xv-badge.xv--gr    { background:#e0f2fe; color:#0369a1; }
.xv-badge.xv--stage { background:#e0e7ff; color:#3730a3; }

/* Stage chip */
.xv-stage-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    background: #e0e7ff; color: #3730a3;
    border-radius: 20px;
    font-size: 11px; font-weight: 700;
    margin-bottom: 7px;
}
.xv-stage-marks {
    background: rgba(255,255,255,.5);
    padding: 1px 7px; border-radius: 10px;
    font-size: 10px; color: #4338ca;
}

/* Content */
.xv-text { font-size: 13px; line-height: 1.65; color: #374151; word-break: break-word; }
.xv-text p { margin: 0 0 5px; }
.xv-text p:last-child { margin-bottom: 0; }

/* Ref tag */
.xv-ref {
    margin-top: 6px;
    font-size: 11px; color: #7c3aed;
    background: #faf5ff;
    padding: 3px 9px; border-radius: 6px;
    display: inline-block;
}

/* ── POLL ────────────────────────────────── */
.xv-poll { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.xv-poll-opt {
    position: relative;
    width: 100%;
    padding: 7px 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 12.5px; font-weight: 600; color: #374151;
    overflow: hidden;
    display: flex; align-items: center; justify-content: space-between;
    transition: all .15s;
}
.xv-poll-opt:not(.is-done):hover { border-color: #7c3aed; color: #5b21b6; }
.xv-poll-opt.is-sel { border-color: #7c3aed; color: #5b21b6; background: #faf5ff; }
.xv-poll-opt.is-done { cursor: default; }
.xv-poll-fill {
    position: absolute; left:0; top:0; height:100%;
    background: #ede9fe; border-radius: 8px;
    transition: width .45s ease; z-index: 0;
}
.xv-poll-lbl  { position: relative; z-index: 1; }
.xv-poll-pct  { position: relative; z-index: 1; font-size: 11px; color: #6d28d9; font-weight: 700; flex-shrink: 0; }
.xv-poll-total{ font-size: 10px; color: #94a3b8; text-align: right; padding-right: 4px; }

/* ── Actions row ─────────────────────────── */
.xv-actions {
    display: flex; align-items: center; gap: 6px;
    margin-top: 9px; padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.xv-help-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; font-size: 11px; font-weight: 600; color: #64748b;
    cursor: pointer; transition: all .13s;
}
.xv-help-btn:hover { border-color: #6d28d9; color: #6d28d9; }
.xv-help-btn.is-on { background: #ede9fe; border-color: #7c3aed; color: #5b21b6; }
.xv-help-n   { font-weight: 700; font-size: 12px; }
.xv-resolve-btn {
    padding: 4px 10px;
    border: 1.5px solid #bbf7d0; border-radius: 20px;
    background: #f0fdf4; color: #15803d;
    font-size: 11px; font-weight: 600; cursor: pointer;
    transition: all .13s;
}
.xv-resolve-btn:hover { background: #dcfce7; }
.xv-flag-btn {
    margin-left: auto;
    background: none; border: none;
    font-size: 13px; cursor: pointer;
    opacity: .35; transition: opacity .12s; padding: 2px 4px;
}
.xv-flag-btn:hover { opacity: .7; }
.xv-del-btn {
    background: none; border: none;
    font-size: 13px; cursor: pointer;
    opacity: .45; transition: opacity .12s; padding: 2px 4px;
}
.xv-del-btn:hover { opacity: 1; color: #dc2626; }

/* ───────────── EMPTY STATE ───────────── */
.xv-empty {
    text-align: center; padding: 44px 20px; color: #94a3b8;
}
.xv-empty-icon { font-size: 40px; opacity: .35; margin-bottom: 10px; }
.xv-empty p    { font-size: 13px; line-height: 1.6; }
.xv-cta-btn {
    margin-top: 14px;
    display: inline-block;
    padding: 9px 22px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff; border: none; border-radius: 22px;
    font-size: 12.5px; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(109,40,217,.35);
    transition: all .15s;
}
.xv-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(109,40,217,.4); }

/* Load more */
.xv-load-more { text-align: center; padding: 10px 10px 4px; }
.xv-load-more-btn {
    padding: 7px 22px;
    border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; font-size: 12px; font-weight: 600; color: #6d28d9;
    cursor: pointer; transition: all .13s;
}
.xv-load-more-btn:hover { background: #faf5ff; border-color: #7c3aed; }

/* ───────────── COMPOSE MODAL (bottom sheet) ───────────── */
.xv-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.6);
    z-index: 99990;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .22s;
    backdrop-filter: blur(4px);
}
.xv-overlay.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 600px) { .xv-overlay { align-items: center; } }

.xv-modal {
    background: #fff;
    width: 100%; max-width: 490px;
    border-radius: 22px 22px 0 0;
    max-height: 92vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -8px 48px rgba(0,0,0,.18);
    padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 600px) { .xv-modal { border-radius: 22px; max-height: 86vh; } }
.xv-overlay.is-open .xv-modal { transform: translateY(0); }

.xv-modal-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.xv-modal-title { font-size: 16px; font-weight: 800; color: #1e293b; }
.xv-modal-close {
    width: 30px; height: 30px;
    background: #f1f5f9; border: none; border-radius: 50%;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s;
}
.xv-modal-close:hover { background: #e2e8f0; }
.xv-modal-bd { padding: 16px 20px 20px; }

/* Type selector */
.xv-type-sel { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.xv-type-opt {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px;
    border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; font-size: 11.5px; font-weight: 600; color: #64748b;
    cursor: pointer; transition: all .13s;
}
.xv-type-opt:hover { border-color: #7c3aed; color: #5b21b6; background: #faf5ff; }
.xv-type-opt.is-on {
    background: #6d28d9; border-color: #6d28d9; color: #fff;
    box-shadow: 0 2px 8px rgba(109,40,217,.28);
}

/* Stage picker */
.xv-stage-picker {
    display: none; flex-wrap: wrap; gap: 6px;
    padding: 10px; background: #f8f7ff; border-radius: 12px;
    margin-bottom: 12px;
}
.xv-stage-picker.show { display: flex; }
.xv-sp-btn {
    padding: 5px 12px;
    border: 1.5px solid #c7d2fe; border-radius: 20px;
    background: #e0e7ff; color: #3730a3;
    font-size: 11px; font-weight: 600; cursor: pointer;
    transition: all .13s;
}
.xv-sp-btn.is-on, .xv-sp-btn:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* Marks row */
.xv-marks-row { display: none; gap: 8px; margin-bottom: 12px; }
.xv-marks-row.show { display: flex; }
.xv-marks-inp, .xv-cat-sel {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 12px; outline: none;
    transition: border-color .15s;
}
.xv-marks-inp:focus, .xv-cat-sel:focus { border-color: #6366f1; }

/* Poll builder */
.xv-poll-bld { display: none; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.xv-poll-bld.show { display: flex; }
.xv-poll-inp {
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 12px; outline: none;
    transition: border-color .15s;
}
.xv-poll-inp:focus { border-color: #7c3aed; }
.xv-add-opt {
    align-self: flex-start;
    padding: 4px 12px;
    border: 1.5px dashed #c4b5fd; border-radius: 20px;
    background: #faf5ff; color: #6d28d9;
    font-size: 11px; font-weight: 600; cursor: pointer;
}

/* Textarea */
.xv-textarea {
    width: 100%; min-height: 100px;
    padding: 12px;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 13px; line-height: 1.65; color: #1e293b;
    resize: vertical; outline: none;
    box-sizing: border-box; font-family: inherit;
    transition: border-color .15s;
}
.xv-textarea:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.08); }
.xv-char-cnt {
    text-align: right; font-size: 10.5px; color: #94a3b8; margin-top: 4px;
}
.xv-char-cnt.warn { color: #f59e0b; }
.xv-char-cnt.over { color: #ef4444; }

/* Submit */
.xv-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff; border: none; border-radius: 14px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    margin-top: 12px;
    transition: all .15s;
    box-shadow: 0 4px 18px rgba(109,40,217,.35);
}
.xv-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(109,40,217,.45); }
.xv-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.xv-submit-hint { text-align: center; font-size: 10.5px; color: #94a3b8; margin-top: 8px; }

/* ───────────── SIDEBAR TAB — Voices count badge ───────────── */
#xila-rsidebar-voices-tab .xila-tab-count {
    background: #ede9fe;
    color: #5b21b6;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

/* ───────────── TOAST ───────────── */
.xv-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1e293b; color: #fff;
    padding: 10px 20px; border-radius: 22px;
    font-size: 13px; font-weight: 600;
    z-index: 999999; opacity: 0; pointer-events: none;
    transition: all .25s; white-space: nowrap;
    box-shadow: 0 4px 22px rgba(0,0,0,.28);
}
.xv-toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }
.xv-toast.ok    { background: #15803d; }
.xv-toast.err   { background: #dc2626; }
.xv-toast.pend  { background: #b45309; }

/* ───────────── MOBILE POPUP — third tab fix ───────────── */
.xila-mobile-popup-tabs { gap: 4px; }


/* ─────────────
   VOICES PANEL — Sidebar layout fix
   इसे style.css के END में add करें
   0
   ───────────── */
/* ── Voices Panel: sidebar proper height fix ── */
.xila-rsidebar-article-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}
.xila-rsidebar-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.xila-rsidebar-panel.is-active {
    display: flex;
}
#xila-panel-voices {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
#xila-panel-voices.is-active {
    display: flex;
}

/* ── Voices List: proper scroll ── */
.xila-rsidebar-article {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#xv-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 10px 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#xv-list .xv-card {
    flex-shrink: 0;  /* ← यही main fix है — cards compress नहीं होंगी */
}
/* Stage tracker और cutoff widgets — fixed height */
#xv-stage-wrap,
#xv-cutoff-wrap {
    flex-shrink: 0;
}
#xv-toolbar.xv-toolbar {
    flex-shrink: 0;
}
.xv-stats-bar {
    flex-shrink: 0;
}

/* ─────────────
   VOICES PANEL — Sidebar layout fix
   इसे style.css के END में add करें
   1
   ───────────── */
/* Sidebar body: flex column, overflow hidden */
.xila-rsidebar-article-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* सभी panels hidden by default */
.xila-rsidebar-panel {
    display: none !important;
    overflow-y: auto;
    height: 100%;
}

/* सिर्फ़ active panel दिखे */
.xila-rsidebar-panel.is-active {
    display: block !important;
}

/* Voices panel active होने पर flex layout */
#xila-panel-voices.is-active {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

/* Voice list — panel के अंदर scroll */
#xila-panel-voices .xv-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 10px 10px 40px;
}

/* Voice cards compress न हों */
#xila-panel-voices .xv-list .xv-card {
    flex-shrink: 0;
}

/* Toolbar, stats, widgets — fixed height */
#xila-panel-voices .xv-toolbar,
#xila-panel-voices .xv-stats-bar,
#xila-panel-voices #xv-stage-wrap,
#xila-panel-voices #xv-cutoff-wrap {
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   REPLIES — Nested Facebook-style
   ═══════════════════════════════════════════ */

/* Reply section container */
.xv-replies-section {
    padding: 6px 13px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Reply + View buttons row */
.xv-reply-toggle-btn,
.xv-view-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #6d28d9;
    cursor: pointer;
    border-radius: 6px;
    transition: background .12s;
}
.xv-reply-toggle-btn:hover,
.xv-view-replies-btn:hover { background: #f5f3ff; }

.xv-replies-chevron { font-size: 10px; color: #a78bfa; }

/* Reply count badge */
.xv-reply-count-num {
    font-weight: 700;
    color: #5b21b6;
}

/* ── Replies List Container ── */
.xv-replies-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid #ede9fe;
    margin-left: 6px;
    padding-left: 10px;
}

/* ── Single Reply Card ── */
.xv-reply-card {
    display: flex;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid #f5f3ff;
}
.xv-reply-card:last-of-type { border-bottom: none; }

.xv-reply-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.xv-reply-body {
    flex: 1;
    min-width: 0;
}

.xv-reply-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.xv-reply-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
}

.xv-reply-time {
    font-size: 10px;
    color: #94a3b8;
}

.xv-reply-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: #374151;
    word-break: break-word;
}
.xv-reply-text p { margin: 0 0 3px; }
.xv-reply-text p:last-child { margin-bottom: 0; }

.xv-reply-del-btn {
    background: none;
    border: none;
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    margin-top: 3px;
    display: inline-block;
}
.xv-reply-del-btn:hover { color: #ef4444; background: #fef2f2; }

/* Load more replies button */
.xv-load-more-replies {
    display: block;
    width: 100%;
    padding: 6px 0;
    background: none;
    border: none;
    font-size: 11.5px;
    font-weight: 600;
    color: #6d28d9;
    cursor: pointer;
    text-align: left;
    margin-top: 4px;
}
.xv-load-more-replies:hover { color: #5b21b6; }
.xv-load-more-replies:disabled { opacity: .5; }

/* Loading state */
.xv-reply-loading {
    font-size: 12px;
    color: #94a3b8;
    padding: 8px 0;
}
.xv-reply-error {
    font-size: 12px;
    color: #ef4444;
    padding: 6px 0;
}

/* ── Inline Reply Form ── */
.xv-reply-form {
    margin-top: 6px;
    padding: 10px 12px;
    background: #faf5ff;
    border: 1.5px solid #ede9fe;
    border-radius: 10px;
}

.xv-reply-textarea {
    width: 100%;
    min-height: 65px;
    padding: 8px 10px;
    border: 1.5px solid #ddd6fe;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s;
}
.xv-reply-textarea:focus { border-color: #7c3aed; }

.xv-reply-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.xv-reply-chars {
    font-size: 10px;
    color: #a78bfa;
    margin-right: auto;
}

.xv-reply-cancel-btn {
    padding: 5px 12px;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    background: #fff;
    color: #6d28d9;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
}
.xv-reply-cancel-btn:hover { background: #f5f3ff; }

.xv-reply-submit-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 8px;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.xv-reply-submit-btn:hover { background: #6d28d9; }
.xv-reply-submit-btn:disabled { opacity: .5; cursor: not-allowed; }


/* ───────────── STUDY BUDDY — CARD TAGS ───────────── */
.xv-sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 4px;
}
.xv-sb-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.xv-sb-tag--lang { background: #f0fdfa; color: #0f766e; border: 1.5px solid #99f6e4; }
.xv-sb-tag--med  { background: #eff6ff; color: #1d4ed8; border: 1.5px solid #bfdbfe; }
.xv-sb-tag--loc  { background: #fdf4ff; color: #7e22ce; border: 1.5px solid #e9d5ff; }

/* ───────────── STUDY BUDDY — MODAL FIELDS ───────────── */
.xv-sb-fields {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    background: #f0fdfa;
    border: 1.5px solid #99f6e4;
    border-radius: 10px;
}
.xv-sb-fields.show { display: flex; }
.xv-sb-inp {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #d1fae5;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
}
.xv-sb-inp:focus { border-color: #0f766e; }
.xv-sb-sel {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #d1fae5;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}
.xv-sb-sel:focus { border-color: #0f766e; }

/* ───────────── STUDY BUDDY — CARD BORDER + BADGE ───────────── */
.xv--sb { border-left: 3px solid #14b8a6; }
.xv--sb .xv-badge { background: #f0fdfa; color: #0f766e; border: 1.5px solid #99f6e4; }