/* ===== Political Compass Page Styles (Ебаное голосование 2067) ===== */

/* Page Background */
body.compass-page {
    background: #fff;
    color: #111;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.5;
}

.topbar__link--active {
    color: #007fa3 !important;
    font-weight: 800;
}

/* Hero Section */
.compass-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    overflow: hidden;
    min-height: auto;
}

.compass-hero .hero__card {
    position: relative;
    z-index: 1;
    background: #fff;
    max-width: 860px;
    width: 100%;
    padding: 36px 40px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.compass-hero .logo {
    margin-bottom: 20px;
    justify-content: center;
}

.compass-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 12px;
    color: #111;
}

.compass-hero__desc {
    font-size: 14.5px;
    line-height: 160%;
    color: #555;
    max-width: 740px;
    margin: 0 auto 24px;
}

/* Mode Switcher */
.compass-switch {
    display: inline-flex;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow: hidden;
    background: #f6f8fa;
    padding: 3px;
    gap: 3px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.compass-mode-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.compass-mode-btn:hover {
    color: #0f172a;
}

.compass-mode-btn.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.compass-mode-badge {
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.compass-mode-btn.active .compass-mode-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Summary Stats Row */
.compass-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.c-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 18px;
    border-top: 3px solid #007fa3;
}

.c-stat-card--red {
    border-top-color: #ef4444;
}

.c-stat-card--blue {
    border-top-color: #3b82f6;
}

.c-stat-card--green {
    border-top-color: #10b981;
}

.c-stat-card--purple {
    border-top-color: #a855f7;
}

.c-stat-card--gold {
    border-top-color: #eaad1a;
}

.c-stat-val {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #111;
    line-height: 1.15;
    margin-bottom: 4px;
}

.c-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.c-stat-desc {
    font-size: 12px;
    color: #888;
}

/* Controls Bar */
.compass-controls {
    background: #f8fafc;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.compass-layer-toggles {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.c-layer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #d0d7de;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Open Sans', sans-serif;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.c-layer-btn:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background: #f1f5f9;
}

.c-layer-btn.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.compass-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.c-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #d0d7de;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.c-filter-btn:hover {
    border-color: #999;
    background: #f1f5f9;
}

.c-filter-btn.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.c-filter-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.c-filter-count {
    background: #f1f5f9;
    color: #444;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
}

.c-filter-btn.active .c-filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.compass-search-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.compass-sub-filter {
    display: inline-flex;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.c-sub-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
}

.c-sub-btn:hover {
    color: #111;
}

.c-sub-btn.active {
    background: #0f172a;
    color: #fff;
    font-weight: 700;
}

.c-search-input {
    padding: 6px 12px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font-size: 12.5px;
    font-family: inherit;
    width: 220px;
    outline: none;
    background: #fff;
}

.c-search-input:focus {
    border-color: #007fa3;
    box-shadow: 0 0 0 2px rgba(0, 127, 163, 0.15);
}

/* Main Compass Card */
.compass-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 24px 20px 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 36px;
}

.compass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.compass-header__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #111;
}

.compass-header__hint {
    font-size: 12px;
    color: #777;
}

/* Compass SVG Canvas Wrap */
.compass-svg-wrap {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

.compass-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* SVG Nodes & Elements */
.compass-node-circle {
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease, stroke-width 0.12s ease;
    transform-origin: center;
    transform-box: fill-box;
}

.compass-node-circle:hover {
    transform: scale(1.6);
    stroke: #0f172a !important;
    stroke-width: 2.5px !important;
}

.compass-node-circle.dimmed {
    opacity: 0.12 !important;
}

.compass-node-circle.highlighted {
    stroke: #000 !important;
    stroke-width: 2.5px !important;
}

.compass-party-group {
    cursor: pointer;
}

.compass-party-circle {
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
    transform-origin: center;
    transform-box: fill-box;
}

.compass-party-group:hover .compass-party-circle {
    transform: scale(1.4);
    stroke: #0f172a;
    stroke-width: 2.8px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.compass-chamber-group {
    cursor: pointer;
}

.compass-chamber-circle {
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    transform-origin: center;
    transform-box: fill-box;
}

.compass-chamber-group:hover .compass-chamber-circle {
    transform: scale(1.2);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

.compass-dispersion-ellipse {
    transition: opacity 0.15s ease;
    pointer-events: none;
}

/* Compass Quadrant Footer Guide */
.compass-quadrant-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.c-quad-pill {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    text-align: left;
}

.c-quad-pill--z-silovik {
    border-left: 4px solid #ef4444;
}

.c-quad-pill--v-silovik {
    border-left: 4px solid #3b82f6;
}

.c-quad-pill--v-liberal {
    border-left: 4px solid #10b981;
}

.c-quad-pill--z-liberal {
    border-left: 4px solid #a855f7;
}

.c-quad-pill__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #111;
    margin-bottom: 2px;
}

.c-quad-pill__coords {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    margin-bottom: 3px;
}

.c-quad-pill__desc {
    font-size: 11px;
    color: #777;
    line-height: 1.35;
}

/* Party Coordinates Data Table */
.compass-table-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 24px 20px;
    margin-bottom: 36px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.compass-table-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #111;
    margin-bottom: 4px;
}

.compass-table-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
}

.c-table-wrap {
    overflow-x: auto;
}

.c-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.c-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.c-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.c-table tr:hover td {
    background: #f8fafc;
}

.c-party-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #111;
}

.c-party-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.c-coord-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
}

.c-coord-badge--z {
    background: #fee2e2;
    color: #991b1b;
}

.c-coord-badge--v {
    background: #e0f2fe;
    color: #0369a1;
}

.c-coord-badge--silovik {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.c-coord-badge--liberal {
    background: #dcfce7;
    color: #166534;
}

/* 4 Quadrants Detailed Explanatory Cards */
.quadrants-section {
    margin-bottom: 40px;
}

.quadrants-section__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 16px;
    color: #111;
}

.quadrant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quad-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.quad-card--z-silovik {
    border-top: 4px solid #ef4444;
}

.quad-card--v-silovik {
    border-top: 4px solid #3b82f6;
}

.quad-card--v-liberal {
    border-top: 4px solid #10b981;
}

.quad-card--z-liberal {
    border-top: 4px solid #a855f7;
}

.quad-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.quad-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #111;
}

.quad-card__tag {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
}

.quad-card__desc {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 12px;
}

.quad-card__parties {
    font-size: 12px;
    color: #777;
}

.quad-card__parties strong {
    color: #111;
}

/* Floating Tooltip */
.parliament-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: #1e293b;
    color: #fff;
    border-radius: 4px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    max-width: 320px;
    font-size: 12px;
    line-height: 1.4;
    transition: opacity 0.08s ease;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-10px);
}

.parliament-tooltip.visible {
    opacity: 1;
}

.pt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pt-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.pt-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 700;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.15);
}

.pt-coords-row {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
}

.pt-coord-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.pt-desc {
    font-size: 11px;
    color: #94a3b8;
}

/* Drawer Profile */
.deputy-drawer__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.deputy-drawer__overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.deputy-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: #fff;
    z-index: 10001;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.deputy-drawer.open {
    transform: translateX(0);
}

.deputy-drawer__header {
    padding: 24px 24px 18px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    background: #f8fafc;
}

.deputy-drawer__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: all 0.15s ease;
}

.deputy-drawer__close:hover {
    background: #f1f5f9;
    color: #000;
}

.deputy-drawer__badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.deputy-drawer__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #111;
    line-height: 1.25;
    margin-bottom: 4px;
}

.deputy-drawer__sub {
    font-size: 12.5px;
    color: #64748b;
}

.deputy-drawer__body {
    padding: 24px;
    flex: 1;
}

.drawer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
}

.drawer-table td {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.drawer-table td:first-child {
    width: 40%;
    color: #64748b;
    font-weight: 600;
}

.drawer-table td:last-child {
    color: #1e293b;
}

.drawer-quote {
    background: #f8fafc;
    border-left: 3px solid #007fa3;
    padding: 12px 16px;
    font-style: italic;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.drawer-map-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #0f172a;
    color: #fff;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.drawer-map-btn:hover {
    background: #1e293b;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .compass-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .compass-quadrant-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .quadrant-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .compass-stats-row {
        grid-template-columns: 1fr;
    }

    .compass-quadrant-bar {
        grid-template-columns: 1fr;
    }

    .c-search-input {
        width: 100%;
    }
}
