/* ================================================
   SALARY PAGE OVERRIDES
   Only styles specific to salary-level pages.
   All other styles inherit from the shared style.css
   ================================================ */

/* ===================================
   SALARY OVERVIEW SECTION
   New component for salary pages
   =================================== */

.salary-overview-section {
    background: #ffffff;
    padding: 40px 20px;
}

.salary-overview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.salary-overview-container h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-overview-container .intro-text {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.7;
}

/* Grid: Main + Sidebar */
.salary-overview-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 2rem;
}

.salary-overview-main {
    min-width: 0;
}

.salary-overview-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* ===================================
   SALARY HIGHLIGHT CARDS
   4-up stat cards at top of overview
   =================================== */

.salary-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}

.salary-highlight-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.salary-highlight-card:hover {
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.6rem;
    color: #6366F1;
    margin-bottom: 10px;
}

.highlight-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 6px;
}

.highlight-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
}

.highlight-detail {
    font-size: 0.78rem;
    color: #6c757d;
}

/* ===================================
   SALARY CHART CARDS
   Shared card for charts & tables
   =================================== */

.salary-chart-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.salary-chart-card h3 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.salary-chart-card p {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.6;
}

.salary-chart-card.full-width {
    grid-column: 1 / -1;
}

/* Chart wrappers */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
}

.chart-wrapper canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.chart-wrapper-wide {
    height: 380px;
}

/* ===================================
   SALARY TABLES
   Percentile, state, and metro tables
   =================================== */

.salary-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.salary-table thead th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.salary-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #4a5568;
}

.salary-table tbody tr:hover {
    background: #f8f9fa;
}

.salary-table tbody tr.highlight-row {
    background: #EEF2FF;
    font-weight: 600;
}

.salary-table tbody tr.highlight-row td {
    color: #2c3e50;
}

/* +/- indicators */
.salary-table td.positive {
    color: #059669;
    font-weight: 600;
}

.salary-table td.negative {
    color: #DC2626;
    font-weight: 600;
}

/* ===================================
   SALARY OVERVIEW SIDEBAR
   Mirrors how-to-page sidebar pattern
   =================================== */

.salary-overview-sidebar .sidebar-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.salary-overview-sidebar .clinical-hours-hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 8px;
    color: white;
    margin-bottom: 2rem;
}

.salary-overview-sidebar .clinical-hours-hero .big-number {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.salary-overview-sidebar .clinical-hours-hero .subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
}

.salary-overview-sidebar .clinical-hours-hero .detail {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.salary-overview-sidebar .clinical-breakdown {
    margin-top: 1.5rem;
}

.salary-overview-sidebar .clinical-breakdown h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.salary-overview-sidebar .clinical-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6366F1;
    transition: all 0.3s ease;
}

.salary-overview-sidebar .clinical-item:hover {
    background: #EEF2FF;
    transform: translateX(4px);
}

.salary-overview-sidebar .clinical-icon {
    font-size: 1.8rem;
    color: #6366F1;
    min-width: 40px;
    text-align: center;
}

.salary-overview-sidebar .clinical-info h5 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.salary-overview-sidebar .clinical-info p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
}

.salary-overview-sidebar .clinical-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.salary-overview-sidebar .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #6366F1;
    line-height: 1;
}

.salary-overview-sidebar .stat-label {
    font-size: 0.85rem;
    color: #4a5568;
    margin-top: 0.25rem;
}

/* ===================================
   TOP PAYING STATES SECTION
   =================================== */

.salary-states-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #ffffff;
}

.salary-states-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.salary-states-section .section-header h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-states-section .section-header p {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
}

.salary-states-container {
    max-width: 1200px;
    margin: 0 auto;
}

.salary-states-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.salary-states-grid > * {
    min-width: 0;
}

/* ===================================
   METRO AREA SECTION
   =================================== */

.salary-metro-section {
    background: #f8f9fa;
    padding: 40px 20px;
}

.salary-metro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.salary-metro-container h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #6366F1;
}

.salary-metro-container .intro-text {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.7;
}

.salary-metro-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 2rem;
}

.salary-metro-main {
    min-width: 0;
}

.salary-metro-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* Metro sidebar cards — inherit specialties-sidebar pattern */
.salary-metro-sidebar .sidebar-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.salary-metro-sidebar .sidebar-card h3 {
    font-size: 1.3rem;
    color: #6366F1;
    margin-bottom: 20px;
    font-weight: 600;
}

.salary-metro-sidebar .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.salary-metro-sidebar .stat-item:last-child {
    border-bottom: none;
}

.salary-metro-sidebar .stat-label {
    font-size: 0.95rem;
    color: #4a5568;
}

.salary-metro-sidebar .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #6366F1;
}

.salary-metro-sidebar .info-box {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.salary-metro-sidebar .info-box i {
    font-size: 36px;
    margin-bottom: 12px;
}

.salary-metro-sidebar .info-box h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.salary-metro-sidebar .info-box p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================
   METRO CARDS
   Individual metro area stat cards
   =================================== */

.metro-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.metro-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metro-card:hover {
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.metro-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e5e7eb;
}

.metro-rank {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.metro-info h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.3;
}

.metro-state {
    font-size: 0.8rem;
    color: #6c757d;
}

.metro-card-body {
    padding: 14px 18px;
    display: flex;
    gap: 12px;
}

.metro-stat {
    flex: 1;
    text-align: center;
}

.metro-stat-label {
    display: block;
    font-size: 0.72rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.metro-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #6366F1;
}

/* ===================================
   RESPONSIVE: Salary Page
   =================================== */

@media (max-width: 1150px) {
    .salary-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .salary-overview-grid,
    .salary-metro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .salary-overview-sidebar,
    .salary-metro-sidebar {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .salary-highlights {
        grid-template-columns: repeat(2, 1fr);
    }

    .salary-states-grid {
        grid-template-columns: 1fr;
    }

    .metro-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .salary-overview-container,
    .salary-metro-container {
        padding: 25px;
    }

    .salary-highlights {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .salary-highlight-card {
        padding: 16px 12px;
    }

    .highlight-value {
        font-size: 1.4rem;
    }

    .highlight-label {
        font-size: 0.8rem;
    }

    .salary-chart-card {
        padding: 20px;
    }

    .chart-wrapper,
    .chart-wrapper-wide {
        height: 260px;
    }

    .salary-table thead th,
    .salary-table tbody td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .metro-card-header {
        padding: 12px 14px;
    }

    .metro-info h4 {
        font-size: 0.9rem;
    }

    .metro-card-body {
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .metro-stat-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .salary-highlights {
        grid-template-columns: 1fr;
    }

    .metro-cards-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 360px) {
    .salary-overview-section {
        padding: 30px 12px;
    }

    .salary-overview-container {
        padding: 16px;
    }

    .salary-chart-card {
        padding: 16px;
    }

    .salary-overview-sidebar .sidebar-card {
        padding: 1.25rem;
    }

    .salary-overview-sidebar .clinical-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .salary-overview-sidebar .clinical-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 320px) {
    .hero-icon {
        flex: none;
        width: 100%;
    }

    .icon,
    #hero-icon {
        width: 100%;
        max-width: 220px;
        height: auto;
    }
}

@media (max-width: 320px) {
    .salary-overview-section {
        padding: 24px 8px;
    }

    .salary-overview-container {
        padding: 10px;
    }

    .salary-highlights {
        gap: 8px;
    }

    .salary-highlight-card {
        padding: 12px 8px;
    }

    .salary-chart-card {
        padding: 12px;
    }

    .salary-overview-sidebar .sidebar-card {
        padding: 12px;
    }

    .salary-overview-sidebar .clinical-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .salary-overview-sidebar .clinical-icon {
        min-width: 28px;
        font-size: 1.2rem;
    }

    .salary-overview-sidebar .clinical-stats {
        grid-template-columns: 1fr;
    }
}