/* Wiki Right Sidebar - Vice Community Redesign */

/* ── Sidebar Container + Accent (GTA 6 style violet/blue) ── */
.wiki-article-right-sidebar {
    --wiki-accent: #5c6cf2;
    --wiki-accent-soft: rgba(92, 108, 242, 0.12);
    --wiki-accent-muted: #6b7af5;
    position: static !important;
    top: auto !important;
}

.wiki-article-right-sidebar > * + * {
    margin-top: 0.8vw;
}

/* ── Info Card Container ── */
.info-table-wrapper {
    border: 0.069vw solid var(--wiki-border, #e2e5ea);
    border-radius: 0.6vw;
    overflow: hidden;
    background: #ffffff;
}

/* ── Type Header (минимальные отступы, яркий белый фон) ── */
.wiki-type-header {
    padding: 0.14vw 0.5vw;
    background: #ffffff;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
    text-align: center;
}

#wiki-type-text {
    font-size: 0.7vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wiki-accent);
}

/* ── Hero Title (название в таблице: чёрный текст, белый фон) ── */
.hero-title-container-mock {
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
    padding: 0.5vw 0.75vw;
    text-align: center;
    background: #ffffff;
}

.hero-title-mock {
    font-size: 1vw;
    font-weight: 700;
    color: var(--wiki-text, #111318);
}

/* ── Hero Image - ALWAYS 16:9 ── */
.wiki-article-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e8eaef;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
    overflow: hidden;
}

.wiki-article-avatar .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Info Table: жёстко 40% / 60%, граница между столбцами ── */
.info-table {
    width: 100%;
}

.info-table-header {
    display: flex;
    background: #ffffff;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
}

.info-table-header-cell {
    font-size: 0.72vw;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wiki-muted, #667085);
    padding: 0.45vw 0.75vw;
    box-sizing: border-box;
}

.info-table-header-cell:first-child {
    width: 40%;
    min-width: 40%;
    flex: 0 0 40%;
    border-right: 0.069vw solid var(--wiki-border, #e2e5ea);
}

.info-table-header-cell:last-child {
    width: 60%;
    min-width: 60%;
    flex: 0 0 60%;
}

/* Single cell header (e.g. "Main Information") — идентично Page Statistics по стилю, чёрный текст */
.info-table-header--single {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
}

.info-table-header--single .info-table-header-cell {
    width: 100%;
    flex: 1;
    border-right: none;
    text-align: center;
    padding: 0.55vw 0.85vw;
    font-size: 0.82vw;
    line-height: 1.25;
    font-weight: 700;
    color: var(--wiki-text, #111318);
}

.info-row {
    display: flex;
    border-bottom: 0.069vw solid var(--wiki-border-light, #f0f1f3);
}

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

.info-cell-key {
    width: 40%;
    min-width: 40%;
    flex: 0 0 40%;
    box-sizing: border-box;
    padding: 0.5vw 0.75vw;
    font-size: 0.8vw;
    font-weight: 700;
    color: var(--wiki-text, #111318);
    background: #ffffff;
    border-right: 0.069vw solid var(--wiki-border, #e2e5ea);
}

.info-cell-value {
    width: 60%;
    min-width: 60%;
    flex: 0 0 60%;
    box-sizing: border-box;
    padding: 0.5vw 0.75vw;
    font-size: 0.8vw;
    font-weight: 400;
    color: var(--wiki-text, #111318);
    background: #ffffff;
}

.info-cell-value a {
    color: var(--wiki-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, text-decoration-color 0.2s;
    text-underline-offset: 0.207vw;
}

.info-cell-value a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.104vw;
    color: var(--wiki-accent-muted);
}

.info-cell-value--muted {
    color: var(--wiki-muted, #667085) !important;
}

/* ── Statistics Card ── */
.statistics-card-container {
    border: 0.069vw solid var(--wiki-border, #e2e5ea);
    border-radius: 0.6vw;
    overflow: hidden;
    background: #ffffff;
}

/* Page Statistics — размер и стилистика строго как у Main Information (0.82vw) */
.statistics-title {
    padding: 0.55vw 0.85vw;
    background: #ffffff;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
    text-align: center;
    font-size: 0.82vw !important;
    line-height: 1.25;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wiki-text, #111318);
}

.wiki-article-right-sidebar .statistics-title,
.wiki-article-page .wiki-article-right-sidebar .statistics-title {
    font-size: 0.82vw !important;
}

/* ── Like / Dislike Buttons (белый фон) ── */
.vote-buttons-container {
    display: flex;
    gap: 0.5vw;
    padding: 0.55vw 0.75vw;
    border-bottom: 0.069vw solid var(--wiki-border-light, #f0f1f3);
    background: #ffffff;
}

.vote-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35vw;
    padding: 0.45vw 0.7vw;
    border-radius: 0.45vw;
    border: 0.069vw solid var(--wiki-border, #e2e5ea);
    background: transparent;
    font-size: 0.82vw;
    font-weight: 600;
    color: #111318;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vote-btn [data-lucide],
.vote-btn .lucide-icon {
    width: 0.95vw;
    height: 0.95vw;
    color: inherit;
}

.vote-btn [data-lucide] svg,
.vote-btn .lucide-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.vote-btn--up:hover {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.06);
    color: #059669;
}

.vote-btn--up.active {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    color: #059669;
}

.vote-btn--up.active [data-lucide] svg,
.vote-btn--up.active .lucide-icon svg {
    fill: #059669;
}

.vote-btn--down:hover {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.06);
    color: #dc2626;
}

.vote-btn--down.active {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    color: #dc2626;
}

.vote-btn--down.active [data-lucide] svg,
.vote-btn--down.active .lucide-icon svg {
    fill: #dc2626;
}

/* ── Statistics Table: 40% / 60%, границы между столбцами и строками ── */
.statistics-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.statistics-table thead {
    display: none;
}

.statistics-table tbody tr {
    border-bottom: 0.069vw solid var(--wiki-border-light, #f0f1f3);
}

.statistics-table tbody tr:last-child {
    border-bottom: none;
}

.statistics-table td {
    padding: 0.5vw 0.75vw;
    font-size: 0.8vw;
    font-family: 'Inter', system-ui, sans-serif;
    vertical-align: middle;
    border-right: 0.069vw solid var(--wiki-border, #e2e5ea);
    background: #ffffff;
}

.statistics-table td:last-child {
    border-right: none;
}

/* Первый столбец Statistics — чёрный текст, как у первого столбца Main Info */
.statistics-table td:first-child {
    width: 40%;
    font-size: 0.8vw;
    font-weight: 700;
    color: #111318;
}

.statistics-table td:first-child > div {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.statistics-table td:last-child {
    width: 60%;
    font-weight: 400;
    color: var(--wiki-text, #111318);
    text-align: left;
}

/* ── Stat icons (accent color) ── */
.wiki-article-right-sidebar .stat-icon {
    color: var(--wiki-accent) !important;
}

.wiki-article-right-sidebar .stat-icon,
.wiki-article-right-sidebar .stat-icon [data-lucide],
.wiki-article-right-sidebar .stat-icon.lucide-icon {
    width: 0.95vw !important;
    height: 0.95vw !important;
}

.wiki-article-right-sidebar .stat-icon [data-lucide] svg,
.wiki-article-right-sidebar .stat-icon.lucide-icon svg,
.wiki-article-right-sidebar .stat-icon svg {
    width: 100% !important;
    height: 100% !important;
    stroke: var(--wiki-accent) !important;
    stroke-width: 2;
    fill: none;
}

/* @username (ссылка) — увеличенный шрифт, цвет и стиль как у ссылок Main Information */
.statistics-table a {
    color: var(--wiki-accent);
    text-decoration: none;
    text-underline-offset: 0.207vw;
    font-weight: 500;
    font-size: 0.9vw;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.statistics-table a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.104vw;
    color: var(--wiki-accent-muted);
}

/* ── Lucide icons ── */
.wiki-article-right-sidebar .lucide-icon,
.wiki-article-right-sidebar [data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.8vw;
    height: 0.8vw;
    flex-shrink: 0;
}

.wiki-article-right-sidebar .lucide-icon svg,
.wiki-article-right-sidebar [data-lucide] svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
