/* Wiki Right Sidebar - Vice Community Redesign */

/* ── Mobile Info Block: показан только на мобильных/планшетах (< 1024px), скрыт на десктопе ── */
.wiki-mobile-info-block {
    display: none;
    flex-direction: column;
    gap: clamp(8px, 0.8vw, 14px);
    margin-bottom: clamp(12px, 1vw, 20px);
    overflow-x: hidden;
    min-width: 0;
}
@media (max-width: 1023px) {
    .wiki-mobile-info-block {
        display: flex;
    }
}
@media (min-width: 1024px) {
    .wiki-mobile-info-block {
        display: none !important;
    }
}

.wiki-mobile-info-card .wiki-type-header span,
.wiki-mobile-info-card #wiki-type-text {
    font-size: clamp(10px, 0.7vw, 13px) !important;
}

.wiki-mobile-info-block .info-cell-key,
.wiki-mobile-info-block .info-cell-value {
    font-size: clamp(13px, 0.9vw, 15px) !important;
    padding: clamp(6px, 0.5vw, 10px) clamp(8px, 0.75vw, 14px) !important;
}

.wiki-mobile-stats-card .vote-btn {
    font-size: clamp(13px, 0.9vw, 15px) !important;
}

.wiki-mobile-stats-card .vote-btn [data-lucide],
.wiki-mobile-stats-card .vote-btn .lucide-icon {
    width: clamp(16px, 1.1vw, 18px) !important;
    height: clamp(16px, 1.1vw, 18px) !important;
}

.wiki-mobile-stats-card .statistics-table td {
    font-size: clamp(13px, 0.9vw, 15px) !important;
}

.wiki-mobile-stats-card .stat-icon {
    width: clamp(16px, 1.1vw, 18px) !important;
    height: clamp(16px, 1.1vw, 18px) !important;
}

/* ── 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 > * + *,
.wiki-mobile-info-block .wiki-collapsible-section + .wiki-collapsible-section {
    margin-top: clamp(8px, 0.8vw, 14px);
}

/* Десктоп: отступ между Main Information и Page Statistics внутри правой колонки */
.wiki-explore-right-sidebar__primary .wiki-collapsible-section + .wiki-collapsible-section {
    margin-top: clamp(10px, 1vw, 18px);
}

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

/* ── Type Header & Hero Title: одинаковая жёсткая высота ── */
.wiki-type-header,
.hero-title-container-mock {
    background: #ffffff;
    border-bottom: 0.069vw solid var(--wiki-border, #e2e5ea);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75vw;
    min-height: 2vw;
}

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

.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.35vw 0.6vw;
    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.35vw 0.6vw;
    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,
.vote-btn--up.active:hover {
    border-color: #34d399;
    background: #fff;
    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,
.vote-btn--down.active:hover {
    border-color: #f87171;
    background: #fff;
    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.35vw 0.6vw;
    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;
}
