/* screen-only default */
.print-only {
    display: none;
}

/* Map Container */
#state-county-map {
    height: 450px;
    border-radius: 0.475rem;
    overflow: hidden;
}

.highcharts-contextbutton {
    display: none !important;
}


.section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    color: #0f172a;
}

.section-title::before {
    content: "";
    width: .4rem;
    height: 1.2em;
    border-radius: 1rem;
    background: linear-gradient(180deg, #1d4ed8, #60a5fa);
    display: inline-block;
}



.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #016fad, #016fad);
}

.kpi-card {
    position: relative;
    overflow: hidden;
}

/* Uniform 3-column widths (all breakpoints): 60% / 20% / 20% */
.table-3col-resp {
    table-layout: fixed;
    /* use colgroup widths */
    width: 100%;
}

.table-3col-resp th,
.table-3col-resp td {
    white-space: normal;
    /* allow wrapping */
    word-break: break-word;
    /* avoid overflow */
    vertical-align: middle;
}

/* Column widths */
.table-3col-resp col:nth-child(1) {
    width: 60%;
}

.table-3col-resp col:nth-child(2),
.table-3col-resp col:nth-child(3) {
    width: 20%;
}

/* (Optional) keep same in print */
@media print {
    .table-3col-resp col:nth-child(1) {
        width: 60% !important;
    }

    .table-3col-resp col:nth-child(2),
    .table-3col-resp col:nth-child(3) {
        width: 20% !important;
    }
}

.fs-large {
    font-size: 2.5rem !important;
}

/* Remove rounded corners from progress bars */
.progress {
    border-radius: 0 !important;
}

.progress-bar {
    border-radius: 0 !important;
}

/* Print Styles */
@media print {

    /* Page setup - reduced top margin */
    @page {
        margin: 0.25in 0.5in 0.5in 0.5in;
        /* Top: 0.25in, Right: 0.5in, Bottom: 0.5in, Left: 0.5in */
        size: letter portrait;
    }

    /* Remove top space from main containers */
    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    .print-only {
        display: block !important;
    }

    /* optional: center the print header text - reduced spacing */
    #print-header {
        text-align: center;
        margin-top: 0px !important;
        padding-top: 0 !important;
    }

    #print-header h1 {
        margin: 0 0 2pt;
    }

    #print-header h2 {
        margin: 0 0 1pt;
        color: #334155;
    }

    #print-header h3 {
        margin: 0 0 4pt;
        color: #64748b;
    }

    #print-header h1 {
        font-size: 36px;
    }

    #print-header h2 {
        font-size: 24px;
    }

    #print-header h3 {
        font-size: 16px;
    }





    .kpistatsrow .card-body {
        margin-top: 20px !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
        padding: 10px !important;
    }

    .card .card-body {
        margin: 0px 10px !important;
        padding: 10px !important;
    }

    /* Remove top spacing from all major containers */
    html,
    body,
    .app-container,
    .app-main,
    .app-content,
    #kt_app_main,
    #kt_app_content,
    .d-flex.flex-column.flex-column-fluid,
    .container-xxl,
    .container-fluid {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Remove top margin from first content elements */
    .text-center.mb-4:first-child,
    h1:first-child,
    h2:first-child,
    .row:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Hide navigation header, footer, and control bar */
    #kt_app_header,
    .app-header,
    #kt_app_footer,
    .control-bar {
        display: none !important;
    }

    /* Ensure all colors print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Remove unnecessary spacing */
    body {
        margin: 0;
        padding: 0;
    }

    /* Keep row layouts side-by-side - CRITICAL */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }

    /* Maintain all column layouts - force specific widths */
    .col-md-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .col-lg-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .col-xl-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .col-xxl-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .col-lg-12,
    .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Prevent page breaks inside important elements */
    .card {
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        background: #fff !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        /*margin-bottom: 1.5rem !important;*/
    }

    /* Remove any pseudo-elements that might interfere */
    .card:before,
    .card:after {
        display: none !important;
        content: none !important;
    }

    section.mb-8,
    section.mb-5 {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Allow breaks between major sections */
    h2.h1 {
        page-break-before: auto;
        page-break-after: avoid;
        margin-top: 2rem !important;
    }

    /* Keep chart containers together and ensure they display fully - ORIGINAL PERFECT SIZING */
    #counties-donut-chart,
    #education-attainment-chart,
    #work-experience-chart,
    #age-chart,
    #earnings-potential-chart,
    #job-density-chart,
    #debt-ratio-chart,
    #graduates-chart {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: visible !important;
        height: 280px !important;
    }

    /* Default map sizing and positioning for all states */
    #state-county-map {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: visible !important;
        height: 280px !important;
        /* Original perfect height for most states */
        margin: 0 auto !important;
        /* Center the map */
        text-align: center !important;
        /* Center alignment */
        position: relative !important;
        /* Ensure positioning context */
        left: 0 !important;
        /* Reset any left positioning */
        right: 0 !important;
        /* Reset any right positioning */
        transform: translateX(0) !important;
        /* Reset any transforms */
    }

    /* Default centering for all state map containers */
    .card-body.map-container {
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px !important;
        /* Some padding but still centered */
        overflow: visible !important;
    }

    /* ONLY for Alaska and Oklahoma - apply the working fixes from the beginning */
    body.state-ak #state-county-map,
    body.state-ok #state-county-map {
        height: 350px !important;
        /* Increased height for better state visibility */
        width: 100% !important;
        margin: 0 !important;
        /* Remove margins to prevent right-side cutoff */
        padding: 0 !important;
        /* Remove padding to maximize available space */
        text-align: left !important;
        /* Override default centering for wide states */
        transform: none !important;
        /* Override default transform */
    }

    /* Kansas, Nebraska, Tennessee, and Kentucky - adjust size only (centering handled by default rules) */
    body.state-ks #state-county-map,
    body.state-ne #state-county-map,
    body.state-tn #state-county-map,
    body.state-ky #state-county-map {
        height: 260px !important;
        /* Slightly smaller than default for these horizontally wider states */
    }

    /* ONLY for Alaska and Oklahoma - Highcharts container fixes */
    body.state-ak #state-county-map .highcharts-container,
    body.state-ak #state-county-map .highcharts-container svg,
    body.state-ok #state-county-map .highcharts-container,
    body.state-ok #state-county-map .highcharts-container svg {
        width: 100% !important;
        height: 350px !important;
        max-width: none !important;
        /* Allow full width for wide states */
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Kansas, Nebraska, Tennessee, and Kentucky - Highcharts container should match the height and be centered */
    body.state-ks #state-county-map .highcharts-container,
    body.state-ks #state-county-map .highcharts-container svg,
    body.state-ne #state-county-map .highcharts-container,
    body.state-ne #state-county-map .highcharts-container svg,
    body.state-tn #state-county-map .highcharts-container,
    body.state-tn #state-county-map .highcharts-container svg,
    body.state-ky #state-county-map .highcharts-container,
    body.state-ky #state-county-map .highcharts-container svg {
        height: 260px !important;
        overflow: visible !important;
        margin: 0 auto !important;
        /* Center the Highcharts container */
        display: block !important;
        /* Ensure margin auto works */
    }

    /* ONLY for Alaska and Oklahoma - fix the card body that contains the map */
    body.state-ak #state-county-map,
    body.state-ok #state-county-map {
        /* Map-specific adjustments already handled above */
    }

    /* Target only the specific card-body that contains the map for Alaska and Oklahoma */
    body.state-ak .card-body.map-container,
    body.state-ok .card-body.map-container {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        display: block !important;
        /* Override flex centering for wide states */
        text-align: left !important;
        /* Override center alignment */
        justify-content: flex-start !important;
        /* Override center justification */
    }

    /* Ensure charts display properly */
    .highcharts-container,
    .highcharts-container svg {
        overflow: visible !important;
    }

    /* Hide zoom/navigation buttons in print mode */
    .highcharts-map-navigation,
    .highcharts-button,
    .highcharts-button-box,
    .highcharts-contextbutton,
    .highcharts-exporting-group {
        display: none !important;
    }

    /* Ensure charts have proper dimensions - only apply to chart containers */
    .card-body>div[id$="-chart"] {
        overflow: visible !important;
    }

    /* Fix donut chart overflow in print mode */
    #counties-donut-chart {
        position: relative !important;
        overflow: hidden !important;
    }

    /* Ensure the donut chart container respects boundaries */
    #counties-donut-chart .highcharts-container {
        position: relative !important;
        width: 100% !important;
        height: 280px !important;
    }

    /* Allow the chart to use full container space */
    #counties-donut-chart svg {
        width: 100% !important;
        height: 100% !important;
    }

    /* Only scale down slightly to prevent overflow */
    #counties-donut-chart .highcharts-series-group {
        transform: scale(0.95) !important;
        transform-origin: center center !important;
    }

    /* Adjust data labels positioning to prevent cutoff */
    #counties-donut-chart .highcharts-data-labels {
        transform: translateX(-5px) !important;
    }

    /* White backgrounds for print */
    body,
    .card,
    .card-body,
    .bg-secondary,
    .bg-light {
        background-color: white !important;
        background: white !important;
    }

    /* Ensure progress bars show properly */
    .progress,
    .progress-bar {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Optimize container widths for print */
    .container-xxl,
    .container-fluid {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Reduce excessive padding */
    .app-wrapper {
        padding: 0 !important;
    }

    .app-container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Keep table rows together */
    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Ensure text is readable */
    body,
    .text-gray-800,
    .text-gray-500,
    .text-gray-600,
    .text-dark {
        color: #000 !important;
    }

    /* Keep badges visible */
    .badge {
        border: 1px solid #ccc;
    }

    /* Card header styling */
    .card-header {
        background-color: white !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    /* Spacing adjustments */
    .mb-5 {
        margin-bottom: 1rem !important;
    }

    .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    /* Ensure icons print */
    i.fa-solid {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
        #info-card p {
            font-size: .85rem !important;
            font-style: italic !important;
        }
    
}

.hc-tooltip {
    font-size: 15px;
    line-height: 1.35;
}

/* Narrow tooltip card */
.hc-tooltip {
    font-size: 14px;
    line-height: 1.35;
}

.hc-tooltip span {
    left: 0px !important;
    top: 0px !important;
}

.tt-card {
    background: #f7f8fa;
    padding: 8px 10px;
    /* a bit tighter */
    border-radius: 8px;
    border: 1px solid #e1e3ea;
    /* box-shadow: 0 2px 8px rgba(0,0,0,.08); */
    /* width: 420px;                      
  max-width: 420px; */
}

.tt-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.tt-sub {
    font-size: 12px;
    color: #555;
}

.tt-list {
    font-size: 12px;
    color: #555;
    margin: 0;
    padding: 0;
}

.statereportchartcontainer {
    height: 280px;
    width: 100%;
}
/* Uniform KPI card height & vertical spacing */
.kpistatsrow .card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: stretch !important;
    height: 100% !important;
}

.kpistatsrow .card-body {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 2.25rem 3rem 1rem 3rem !important; /* bring back nice top/bottom spacing */
    margin: 0 !important;
}

    /* Keep consistent spacing for the stacked icon-number-text */
    .kpistatsrow .card-body > .m-0.mb-4 {
        margin-bottom: 1rem !important; /* space below icon */
    }

    .kpistatsrow .card-body span.fw-bold {
        margin-bottom: 0.75rem !important; /* space below big number */
    }

    /* Allow the description block to grow but keep balance */
    .kpistatsrow .card-body .m-0[style*="min-height"] {
        min-height: 3.5rem !important;
    }

/* Optional: uniform top and bottom row spacing */
.kpistatsrow {
    row-gap: 1.5rem !important;
}
.bg-primary {
    background-color: #006eae !important
}

.btn.btn-primary {
    background-color: #006eae !important
}

.btn.btn-primary.active {
    background-color: #006eae !important;
}

.table-width-utilities {
	table-layout: fixed;
	width: 100%;
}

.table-width-utilities .w-20 { width: 20% !important; }
.table-width-utilities .w-25 { width: 25% !important; }
.table-width-utilities .w-30 { width: 30% !important; }
.table-width-utilities .w-50 { width: 50% !important; }

#graduates-chart,
#graduates-chart .highcharts-container,
#graduates-chart .highcharts-root,
#graduates-chart svg,
#debt-ratio-chart,
#debt-ratio-chart .highcharts-container,
#debt-ratio-chart .highcharts-root,
#debt-ratio-chart svg,
#job-density-chart,
#job-density-chart .highcharts-container,
#job-density-chart .highcharts-root,
#job-density-chart svg,
#earnings-potential-chart,
#earnings-potential-chart .highcharts-container,
#earnings-potential-chart .highcharts-root,
#earnings-potential-chart svg,
#education-attainment-chart,
#education-attainment-chart .highcharts-container,
#education-attainment-chart .highcharts-root,
#education-attainment-chart svg,
#age-chart,
#age-chart .highcharts-container,
#age-chart .highcharts-root,
#age-chart svg,
#work-experience-chart,
#work-experience-chart .highcharts-container,
#work-experience-chart .highcharts-root,
#work-experience-chart svg
{
    overflow: visible !important;
}

#graduates-chart,
#debt-ratio-chart,
#job-density-chart,
#earnings-potential-chart,
#education-attainment-chart,
#age-chart,
#work-experience-chart {
    padding-right: 3rem !important;
}

.card-body,
.col,
.row {
    overflow: visible !important;
}
.card .countscardheader {

    min-height: 50px;
}
.hsstatechoices {



    width: 100%;
    margin-bottom: 0px;
    height: 30px;
}
    .hsstatechoices .choices__inner {
        background-color: #ffffff;
        height: 30px;
        padding: 0px;
        min-height: 30px;
    }
    .hsstatechoices .choices__list--single {
        padding-top: 2px;
        width: 300px;
    }