/* ============================================================
   Responsive — Large Tablet
============================================================ */

@media (max-width: 1200px) {

    .tax-filter-form {
        grid-template-columns:
            1fr 1fr;
    }

}


/* ============================================================
   Responsive — Tablet
============================================================ */

@media (max-width: 1000px) {

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-grid {

        grid-template-columns:
            1fr;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:hover,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:focus-within {

        transform:
            none;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:hover
    .tax-indicator-chart-wrap,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:focus-within
    .tax-indicator-chart-wrap {

        height:
            320px;

        min-height:
            320px;
    }

}


/* ============================================================
   Responsive — Mobile
============================================================ */

@media (max-width: 720px) {

    .tax-filter-form,
    .tax-kpi-grid {

        grid-template-columns:
            1fr;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-section-heading,

    .public-dashboard-page.tax-dashboard-page
    .downloads-header,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-group-header,

    .public-dashboard-page.tax-dashboard-page
    .tax-chart-card-controls,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-header {

        flex-direction:
            column;

        align-items:
            stretch;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-chart-header-badges {

        justify-content:
            flex-start;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-chart-actions,

    .public-dashboard-page.tax-dashboard-page
    .tax-chart-tab-switcher {

        width:
            100%;

        flex-direction:
            column;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-chart-tab-btn,

    .public-dashboard-page.tax-dashboard-page
    .tax-small-download-btn {

        width:
            100%;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-wrap {

        height:
            260px;

        min-height:
            260px;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-kpi-method-row,

    .public-dashboard-page.tax-dashboard-page
    .tax-chart-method-row,

    .public-dashboard-page.tax-dashboard-page
    .tax-kpi-scope,

    .public-dashboard-page.tax-dashboard-page
    .tax-meta-row {

        grid-template-columns:
            1fr;

        gap:
            3px;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-multi-chart-card {

        padding:
            16px;
    }

}


/* ============================================================
   Reduced Motion
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-wrap,

    .public-dashboard-page.tax-dashboard-page
    .collapsible-icon {

        transition:
            none !important;
    }


    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:hover,

    .public-dashboard-page.tax-dashboard-page
    .tax-indicator-chart-card:focus-within {

        transform:
            none !important;
    }

}


.tax-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tax-dashboard-page .tax-kpi-grid .kpi-card {
    min-height: 132px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 39, 71, 0.10);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(15, 23, 42, 0.06);
}

.tax-dashboard-page .tax-kpi-grid .kpi-card::before,
.tax-dashboard-page .tax-kpi-grid .kpi-card::after {
    content: none !important;
    display: none !important;
}

.tax-dashboard-page .tax-kpi-grid .kpi-label {
    color: #4a6692;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 10px;
}

.tax-dashboard-page .tax-kpi-grid .kpi-value {
    color: #0b2345;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
}

.tax-dashboard-page .tax-kpi-grid .kpi-meta {
    color: #4a6692;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

[data-theme="light"] .tax-dashboard-page .tax-kpi-grid .kpi-card {
    background: #ffffff !important;
    border-color: rgba(15, 39, 71, 0.10) !important;
}

[data-theme="light"] .tax-dashboard-page .tax-kpi-grid .kpi-label,
[data-theme="light"] .tax-dashboard-page .tax-kpi-grid .kpi-meta {
    color: #4a6692 !important;
}

[data-theme="light"] .tax-dashboard-page .tax-kpi-grid .kpi-value {
    color: #0b2345 !important;
}

@media (max-width: 1400px) {
    .tax-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .tax-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tax-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* TAX DASHBOARD CLEAN CHART LAYOUT */

/* Remove introductory chart wording */
.tax-dashboard-page .tax-chart-section-heading {
    display: none !important;
}

/* Remove dataset/source group heading */
.tax-dashboard-page .tax-indicator-group-header {
    display: none !important;
}

/* Remove Source + Actual/Projection information boxes */
.tax-dashboard-page .tax-chart-methodology {
    display: none !important;
}

/* Remove unnecessary spacing left by hidden headings */
.tax-dashboard-page .tax-indicator-group-block {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

/* Two clean chart cards */
.tax-dashboard-page .tax-indicator-chart-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    align-items: start !important;
}

/* Tax-to-GDP first card = left */

/* Tax composition second card = right */

@media (max-width: 1100px) {
    .tax-dashboard-page .tax-indicator-chart-grid {
        grid-template-columns: 1fr !important;
    }
}



/* ============================================================
   TAX — LIGHT / DARK LAYOUT PARITY
   Dark mode must use exactly the same vertical spacing
   as light mode.
============================================================ */


/* Indicator filters -> KPI cards */
.public-dashboard-page.tax-dashboard-page
.filter-bar-card,

.public-dashboard-page.tax-dashboard-page
.filter-bar-card.dashboard-card {
    margin-bottom: 22px !important;
}


/* KPI cards -> chart cards */
.public-dashboard-page.tax-dashboard-page
.tax-kpi-grid {
    margin-top: 0 !important;
    margin-bottom: 24px !important;
}


/* Prevent chart wrapper from adding a theme-specific offset */
.public-dashboard-page.tax-dashboard-page
.tax-multi-chart-card {
    margin-top: 0 !important;
}