/* Hide bottom border in data-table to match with card-footer */
.data-table-card tbody tr:last-child td,
.data-table-card tbody tr:last-child th {
    border-bottom: none !important;
}

.allocation-row-department-closed > td,
.allocation-row-department-closed > th {
    background-color: var(--tblr-red-lt) !important;
}

/* Hide CSV item in the ApexCharts export menu */
.apexcharts-menu-item.exportCSV {
    display: none;
}

.import-processing-name {
    font-size: 1.5rem;
    line-height: 1.3;
}

.import-processing-hero {
    --tblr-avatar-size: 3.5rem;
}

.import-processing-step-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.import-processing-step-desc {
    font-size: 0.875rem;
    line-height: 1.45;
}

.import-processing-steps.steps-vertical .step-item {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.import-processing-steps.steps-vertical .step-item:not(:first-child) {
    margin-top: 0.75rem;
}

.dropdown-menu-scrollable {
    max-height: 500px;
    overflow-y: auto;
}

.dropdown-item-typeahead-focus {
    background-color: var(--tblr-dropdown-link-hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--tblr-dropdown-link-hover-color, inherit);
}

.benchmark-delta-heatmap__tooltip {
    position: fixed;
    z-index: 1080;
    pointer-events: none;
    max-width: 16rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: var(--tblr-bg-surface, #fff);
    border: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.1));
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.12);
}

.import-processing-status-message {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--tblr-body-color);
}

.import-processing-spinner-icon {
    width: 1.75rem;
    height: 1.75rem;
    animation: import-processing-spin 0.9s linear infinite;
}

@keyframes import-processing-spin {
    to {
        transform: rotate(360deg);
    }
}

.onboarding-step-action-icon {
    animation: onboarding-action-nudge 1.4s ease-in-out infinite;
}

@keyframes onboarding-action-nudge {
    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(0.2em);
    }
}

.case-flow-map-square {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: min(100%, 560px);
}

.case-flow-map-square .case-flow-map-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: var(--tblr-border-radius, 4px);
    overflow: hidden;
    background: var(--tblr-bg-surface-secondary, #f8f9fa);
}

.case-flow-map-container.leaflet-container {
    height: 100%;
    width: 100%;
    font: inherit;
}

.case-flow-map-container .leaflet-pane {
    z-index: 1;
}

.case-flow-map-container .leaflet-top,
.case-flow-map-container .leaflet-bottom {
    z-index: 2;
}

.catalog-orientation-map-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 420px;
}

.catalog-orientation-map-frame .case-flow-map-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: var(--tblr-border-radius, 4px);
    overflow: hidden;
    background: var(--tblr-bg-surface-secondary, #f8f9fa);
}

.catalog-orientation-map-pin {
    background: transparent;
    border: 0;
}

.catalog-year-heatmap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catalog-year-heatmap-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

.catalog-year-heatmap-cell {
    --catalog-heat: 0;
    border-radius: var(--tblr-border-radius, 4px);
    padding: 0.5rem 0.35rem;
    text-align: center;
    background: color-mix(
        in srgb,
        var(--tblr-primary, #206bc4) calc(var(--catalog-heat) * 85%),
        var(--tblr-bg-surface-secondary, #f1f5f9)
    );
    border: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.08));
}

.catalog-year-heatmap-cell.is-empty {
    color: var(--tblr-secondary, #6c7a91);
}

.catalog-year-heatmap-cell.is-sensitive .catalog-year-heatmap-count {
    font-style: italic;
    opacity: 0.85;
}

.catalog-year-heatmap-cell.is-future {
    color: var(--tblr-secondary, #6c7a91);
    background: transparent;
    border-style: dashed;
    opacity: 0.7;
}

.catalog-year-heatmap-year {
    font-weight: 600;
    line-height: 1.2;
}

.catalog-year-heatmap-count {
    margin-top: 0.15rem;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.data-quality-drawer {
    --bs-offcanvas-width: min(28rem, 100vw);
}

.analysis-explorer-edit-drawer .offcanvas-body {
    padding: 0.5rem 0.75rem;
}

.analysis-explorer-edit-drawer .offcanvas-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.filter-drawer > .offcanvas-body {
    flex: 1 1 auto;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
}

.filter-drawer > .offcanvas-footer {
    flex: 0 0 auto;
    background: var(--tblr-bg-surface, #fff);
}

.filter-drawer.offcanvas {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh;
}

.filter-drawer .accordion-body,
.analysis-explorer-edit-drawer .accordion-body,
.export-filter-accordion .accordion-body {
    padding: 0.375rem 0.5rem;
}

.filter-drawer .accordion-button,
.analysis-explorer-edit-drawer .accordion-button,
.export-filter-accordion .accordion-button {
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    gap: 0.375rem;
}

.filter-drawer .accordion-button::after,
.analysis-explorer-edit-drawer .accordion-button::after,
.export-filter-accordion .accordion-button::after {
    display: none;
}

.filter-drawer .analysis-explorer-accordion-state-icon,
.analysis-explorer-edit-drawer .analysis-explorer-accordion-state-icon,
.export-filter-accordion .analysis-explorer-accordion-state-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--tblr-secondary, #6c757d);
}

.filter-drawer .analysis-explorer-accordion-state-icon .icon,
.analysis-explorer-edit-drawer .analysis-explorer-accordion-state-icon .icon,
.export-filter-accordion .analysis-explorer-accordion-state-icon .icon {
    width: 1rem;
    height: 1rem;
}

.filter-drawer .accordion-button .analysis-explorer-accordion-state-icon--expanded,
.analysis-explorer-edit-drawer .accordion-button .analysis-explorer-accordion-state-icon--expanded,
.export-filter-accordion .accordion-button .analysis-explorer-accordion-state-icon--expanded {
    display: inline-flex;
}

.filter-drawer .accordion-button .analysis-explorer-accordion-state-icon--collapsed,
.analysis-explorer-edit-drawer .accordion-button .analysis-explorer-accordion-state-icon--collapsed,
.export-filter-accordion .accordion-button .analysis-explorer-accordion-state-icon--collapsed {
    display: none;
}

.filter-drawer .accordion-button.collapsed .analysis-explorer-accordion-state-icon--expanded,
.analysis-explorer-edit-drawer .accordion-button.collapsed .analysis-explorer-accordion-state-icon--expanded,
.export-filter-accordion .accordion-button.collapsed .analysis-explorer-accordion-state-icon--expanded {
    display: none;
}

.filter-drawer .accordion-button.collapsed .analysis-explorer-accordion-state-icon--collapsed,
.analysis-explorer-edit-drawer .accordion-button.collapsed .analysis-explorer-accordion-state-icon--collapsed,
.export-filter-accordion .accordion-button.collapsed .analysis-explorer-accordion-state-icon--collapsed {
    display: inline-flex;
}

.filter-drawer .accordion-button:not(.collapsed),
.analysis-explorer-edit-drawer .accordion-button:not(.collapsed),
.export-filter-accordion .accordion-button:not(.collapsed) {
    box-shadow: none;
}

.filter-drawer .mb-3,
.analysis-explorer-edit-drawer .mb-3 {
    margin-bottom: 0.375rem !important;
}

.filter-drawer .form-label,
.analysis-explorer-edit-drawer .form-label {
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
}

.filter-drawer .row.g-2,
.analysis-explorer-edit-drawer .row.g-3 {
    --bs-gutter-y: 0.375rem;
    --bs-gutter-x: 0.5rem;
}

.filter-drawer .allocation-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-drawer .allocation-filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.filter-drawer .allocation-filter-checkbox-group + .allocation-filter-checkbox-group {
    padding-top: 0.25rem;
    border-top: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.08));
}

.filter-drawer .allocation-filter-checkboxes .form-check-label {
    font-size: 0.9375rem;
    line-height: 1.4;
}

.filter-drawer .allocation-filter-checkboxes .form-check {
    min-height: 1.75rem;
    margin-bottom: 0;
}

.stats-aex-table-card-body {
    overflow: hidden;
}

.stats-aex-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.stats-aex-table-scroll .stats-aex-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    margin-bottom: 0;
}

.stats-aex-table-scroll .stats-aex-table:has(thead th:nth-child(4)) {
    width: max-content;
    table-layout: auto;
}

.stats-aex-table-scroll .stats-aex-table > :not(caption) > tr > :first-child {
    width: 16.666%;
    max-width: 16.666%;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.stats-aex-table-scroll .stats-aex-table:has(thead th:nth-child(4)) > :not(caption) > tr > :first-child {
    width: 1%;
    max-width: 12rem;
    min-width: 4.5rem;
}

.stats-aex-table-scroll .table-sort.sorted-asc::after {
    content: ' \2191';
    font-size: 0.75em;
}

.stats-aex-table-scroll .table-sort.sorted-desc::after {
    content: ' \2193';
    font-size: 0.75em;
}

.data-quality-indicator-btn {
    max-width: 100%;
}

.data-quality-dimensions-table .data-quality-dimension-note-row > td {
    padding: 0;
    border-top: none;
}

.data-quality-dimensions-table .data-quality-dimension-row + .data-quality-dimension-note-row > td {
    border-top: none;
}

.data-quality-dimension-note-subtable {
    --bs-table-bg: var(--tblr-bg-surface-secondary, #f8f9fa);
    width: 100%;
    table-layout: fixed;
}

.data-quality-dimension-note-subtable td {
    padding: 0.375rem 0.75rem;
    border: none;
    border-left: 3px solid var(--tblr-border-color, #dee2e6);
}

.data-quality-details-accordion .accordion-button {
    font-size: 0.9375rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.data-quality-details-accordion .accordion-button:not(.collapsed) {
    box-shadow: none;
}

.data-quality-allocation-table th {
    font-weight: 600;
}

.data-quality-allocation-table th[scope="row"] {
    color: var(--tblr-secondary, #6c757d);
    font-weight: 500;
}

.data-quality-allocation-bucket-sufficient {
    --bs-table-bg: rgba(var(--tblr-green-rgb, 47, 179, 68), 0.04);
}

.hospital-population-map-pin {
    background: transparent;
    border: none;
}

.hospital-population-map-legend-pin {
    flex-shrink: 0;
}

.hospital-population-map-legend-pin--participating {
    color: #1864ab;
}

.hospital-population-map-legend-pin--reference {
    color: #868e96;
}

.page-body:has(#stats-hospital-population) {
    padding-top: 0;
}

.stats-indication-compare-side-a {
    border-left-color: var(--tblr-primary) !important;
}

.stats-indication-compare-side-b {
    border-left-color: var(--tblr-secondary, #667382) !important;
}

.stats-indication-compare-indication-link {
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.2em;
}

.stats-indication-compare-side-a .stats-indication-compare-indication-link:hover,
.stats-indication-compare-side-a .stats-indication-compare-indication-link:focus-visible {
    color: inherit;
    text-decoration-color: var(--tblr-primary);
}

.stats-indication-compare-side-b .stats-indication-compare-indication-link:hover,
.stats-indication-compare-side-b .stats-indication-compare-indication-link:focus-visible {
    color: inherit;
    text-decoration-color: var(--tblr-secondary, #667382);
}

.input-group [data-testid^="password-toggle-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 0.5rem;
}

.input-group [data-testid^="password-toggle-"] .icon {
    margin: 0;
}
