/* =========================================================
   forum.css - Styling cho Diễn đàn chuẩn VOZ Style (Dual Theme + Responsive)
   ========================================================= */

/* ── Banner & Header ──────────────────────────────────────── */
.forum-header-banner,
[data-bs-theme="light"] .forum-header-banner,
[data-bs-theme="dark"] .forum-header-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    margin-bottom: 1.5rem;
    color: #ffffff !important;
}

.forum-header-banner h2,
[data-bs-theme="light"] .forum-header-banner h2,
[data-bs-theme="dark"] .forum-header-banner h2,
.forum-header-banner p,
[data-bs-theme="light"] .forum-header-banner p,
[data-bs-theme="dark"] .forum-header-banner p,
.forum-header-banner span,
.forum-header-banner div {
    color: #ffffff !important;
    opacity: 1 !important;
}

.forum-header-banner i.fa-comments,
.forum-header-banner i.fa-folder-open {
    color: #fbbf24 !important;
}

/* ── Badges Tiền tố (Thread Prefixes) ────────────────────── */
.voz-prefix {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    line-height: 1.35;
}

/* Light Mode Prefixes High-Contrast VOZ Style */
.voz-prefix-tu-van { background: #dbeafe; color: #1d4ed8 !important; border: 1px solid #93c5fd; }
.voz-prefix-chia-se { background: #d1fae5; color: #047857 !important; border: 1px solid #6ee7b7; }
.voz-prefix-thao-luan { background: #fef3c7; color: #b45309 !important; border: 1px solid #fde68a; }
.voz-prefix-hoi-dap { background: #ede9fe; color: #6d28d9 !important; border: 1px solid #ddd6fe; }
.voz-prefix-tam-su { background: #fce7f3; color: #be185d !important; border: 1px solid #fbcfe8; }
.voz-prefix-tin-tuc { background: #cffafe; color: #0e7490 !important; border: 1px solid #a5f3fc; }
.voz-prefix-danh-gia { background: #ffe4e6; color: #be123c !important; border: 1px solid #fecdd3; }
.voz-prefix-review { background: #e0e7ff; color: #3730a3 !important; border: 1px solid #c7d2fe; }
.voz-prefix-default { background: #f1f5f9; color: #334155 !important; border: 1px solid #cbd5e1; }

/* Dark Mode Prefixes Override */
[data-bs-theme="dark"] .voz-prefix-tu-van { background: rgba(59, 130, 246, 0.2); color: #60a5fa !important; border-color: rgba(59, 130, 246, 0.4); }
[data-bs-theme="dark"] .voz-prefix-chia-se { background: rgba(16, 185, 129, 0.2); color: #34d399 !important; border-color: rgba(16, 185, 129, 0.4); }
[data-bs-theme="dark"] .voz-prefix-thao-luan { background: rgba(245, 158, 11, 0.2); color: #fbbf24 !important; border-color: rgba(245, 158, 11, 0.4); }
[data-bs-theme="dark"] .voz-prefix-hoi-dap { background: rgba(139, 92, 246, 0.2); color: #a78bfa !important; border-color: rgba(139, 92, 246, 0.4); }
[data-bs-theme="dark"] .voz-prefix-tam-su { background: rgba(236, 72, 153, 0.2); color: #f472b6 !important; border-color: rgba(236, 72, 153, 0.4); }
[data-bs-theme="dark"] .voz-prefix-tin-tuc { background: rgba(6, 182, 212, 0.2); color: #22d3ee !important; border-color: rgba(6, 182, 212, 0.4); }
[data-bs-theme="dark"] .voz-prefix-danh-gia { background: rgba(225, 29, 72, 0.2); color: #fb7185 !important; border-color: rgba(225, 29, 72, 0.4); }
[data-bs-theme="dark"] .voz-prefix-review { background: rgba(99, 102, 241, 0.2); color: #818cf8 !important; border-color: rgba(99, 102, 241, 0.4); }
[data-bs-theme="dark"] .voz-prefix-default { background: rgba(255, 255, 255, 0.1); color: #e2e8f0 !important; border-color: var(--glass-border); }

/* ── VOZ XenForo Table Layout ────────────────────────────── */
.voz-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .voz-table-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: var(--glass-border);
}

.voz-table-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
}

[data-bs-theme="dark"] .voz-table-header {
    background: rgba(15, 23, 42, 0.6);
    border-bottom-color: var(--glass-border);
}

.voz-thread-row {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

[data-bs-theme="dark"] .voz-thread-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.voz-thread-row:last-child {
    border-bottom: none;
}

.voz-thread-row:hover {
    background: #f8fafc;
}

[data-bs-theme="dark"] .voz-thread-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.voz-thread-row.is-pinned {
    background: #fffdf5;
}
[data-bs-theme="dark"] .voz-thread-row.is-pinned {
    background: rgba(245, 158, 11, 0.06);
}

/* Tiêu đề bài viết chuẩn VOZ Màu Cam Đỏ High-Contrast */
.voz-title-link {
    color: #c2410c;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s;
}

[data-bs-theme="dark"] .voz-title-link {
    color: #fb923c;
}

.voz-title-link:hover {
    color: #ea580c !important;
    text-decoration: underline;
}

.voz-meta-sub {
    font-size: 0.78rem;
    color: #64748b;
}

[data-bs-theme="dark"] .voz-meta-sub {
    color: #94a3b8;
}

.voz-page-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin-left: 2px;
    text-decoration: none;
}

[data-bs-theme="dark"] .voz-page-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-color: var(--glass-border);
}

/* Cột Replies/Views chuẩn VOZ */
.voz-stats-col {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    min-width: 110px;
    line-height: 1.4;
}

[data-bs-theme="dark"] .voz-stats-col {
    color: #94a3b8;
}

.voz-stats-col .stat-val {
    font-weight: 700;
    color: #334155;
}

[data-bs-theme="dark"] .voz-stats-col .stat-val {
    color: #f1f5f9;
}

/* Cột Last Post bên phải ngoài cùng */
.voz-lastpost-col {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    min-width: 140px;
    line-height: 1.35;
}

[data-bs-theme="dark"] .voz-lastpost-col {
    color: #94a3b8;
}

.voz-lastpost-time {
    color: #3b82f6;
    font-weight: 600;
}

/* ── Filter Dropdown Popup (Chuẩn VOZ XenForo Filter) ───── */
.voz-filter-popup {
    min-width: 320px;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .voz-filter-popup {
    background: #0f172a;
    border-color: var(--glass-border);
}

/* ── Sidebar Trending Content Box ──────────────────────── */
.voz-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .voz-sidebar-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: var(--glass-border);
}

.voz-trending-item {
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

[data-bs-theme="dark"] .voz-trending-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.voz-trending-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.voz-trending-title {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.35;
    text-decoration: none;
}

[data-bs-theme="dark"] .voz-trending-title {
    color: #60a5fa;
}

.voz-trending-title:hover {
    text-decoration: underline;
}

/* ── Stat Icon Box ────────────────────────────────────────── */
.forum-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.forum-stat-icon.icon-threads { background: #2563eb; color: #ffffff !important; }
.forum-stat-icon.icon-posts { background: #059669; color: #ffffff !important; }
.forum-stat-icon.icon-members { background: #d97706; color: #ffffff !important; }

/* ── Mobile Responsiveness (< 768px & < 576px) ─────────────── */
@media (max-width: 767.98px) {
    .voz-stats-col, .voz-lastpost-col {
        font-size: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .forum-header-banner {
        padding: 1.25rem 1rem !important;
        border-radius: 12px;
        text-align: center;
    }
    .forum-header-banner h2 {
        font-size: 1.3rem !important;
    }
    .voz-thread-row {
        padding: 0.75rem 0.85rem;
    }
    .voz-title-link {
        font-size: 0.92rem;
    }
}
