/* Comparison Page Styles — Imports base theme from style.css */
@import url('style.css');

/* --- Layout --- */
.compare-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

.sidebar-card h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 700;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0;
}

.filter-group select,
.filter-group input {
    height: 40px;
    padding: 0 0.75rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.filter-group select option {
    background: #0a0a0a;
    color: var(--text-primary);
}

.filter-reset {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-reset:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* My Salary Card */
.my-salary-card {
    background: var(--bg-surface);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.my-salary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
}

.my-salary-card .my-salary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.my-salary-card .my-salary-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #10b981;
    font-feature-settings: "tnum";
    margin-bottom: 0.25rem;
}

.my-salary-card .my-salary-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.my-salary-card .no-calc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.my-salary-card .no-calc a {
    color: #10b981;
    text-decoration: none;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Stats Row --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    font-feature-settings: "tnum";
    margin-bottom: 0.25rem;
}

.stat-card .stat-desc {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Turkey Map --- */
.map-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.map-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.map-scale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.scale-bar {
    width: 120px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
}

.map-wrapper {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

/* Leaflet overrides for dark theme */
#turkeyMap {
    background: #0c0c10 !important;
}

.leaflet-container {
    font-family: 'Inter', sans-serif;
}

.leaflet-control-zoom a {
    background: rgba(20, 20, 25, 0.9) !important;
    color: #ccc !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(30, 30, 40, 0.95) !important;
    color: #fff !important;
}

/* Leaflet tooltip for salary */
.leaflet-salary-tooltip {
    background: rgba(10, 10, 15, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px);
    color: #fff !important;
    font-size: 0.8rem;
}

.leaflet-salary-tooltip::before {
    border-top-color: rgba(10, 10, 15, 0.95) !important;
}

/* --- Bar Chart --- */
.bar-chart-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.bar-chart-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 200px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    min-width: fit-content;
    white-space: nowrap;
}

.bar-fill.user-bar {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Salary Table --- */
.salary-table-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.salary-table-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 1.5rem 2rem 1rem;
}

.salary-table-section table {
    width: 100%;
    border-collapse: collapse;
}

.salary-table-section th {
    text-align: left;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.salary-table-section td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.salary-table-section td:last-child {
    font-weight: 800;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.salary-table-section tbody tr {
    transition: background 0.15s;
}

.salary-table-section tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.salary-table-section tbody tr.is-user {
    background: rgba(16, 185, 129, 0.06);
    border-left: 3px solid #10b981;
}

.table-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Position badge */
.pos-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* --- Responsive --- */
/* Source Badges */
.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.source-web {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.source-personal {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

@media (max-width: 900px) {
    .compare-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card,
    .my-salary-card {
        flex: 1;
        min-width: 250px;
    }

    .bar-label {
        width: 120px;
        font-size: 0.7rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
}