@font-face {
    font-family: Acumin;
    font-weight: bold;
    src: url("Acumin-BdPro.otf") format("opentype");
}

#app-container {
    width: 100%;
    max-width: none;
}

.columns-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

body {
    background-color: #f9f9f9;
    color: #333333;
    font-size: 15px;
    margin: 0px;
}

hr {
    margin: 0.3rem 0rem;
}

.banner {
    height: 5.5rem;
    padding: 0rem 2rem 0rem;
    background-color: #263b69;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.banner Img {
    position: relative;
    height: 5.5rem;
    width: auto;
    margin-left: 2%;
}

H5 {
    color: #2c8cff;
    font-weight: 300;
}

H5, H3 {
    font-family: Acumin, "Helvetica Neue", sans-serif;
}

#left-column {
    width: 20%;
    flex-shrink: 0;
    margin-top: 20px;
    padding: 0rem 1rem;
    min-height: calc(100vh - 5.5rem);
    box-sizing: border-box;
}

#right-column {
    flex: 1;
    min-width: 0;
    background-color: #f4f4f4;
    padding: 0rem 2rem;
    min-height: calc(100vh - 5.5rem);
    box-sizing: border-box;
}

.table-row {
    height: 63px;
    vertical-align: middle;
    font-size: 13px;
}

.wait_time_graph > div, .patient_score_graph > div {
    height: 100% !important;
    width: 100% !important;
}

.draglayer {
    cursor: pointer !important;
}

#intro {
    margin: 20px 0px;
    font-family: "Helvetica Neue", sans-serif;
    text-align: justify;
}

#control-card > h6 {
    font-weight: bold;
}

#patient_volume_card, #wait_time_card {
    background-color: #FFFFFF;
    padding: 1rem;
    margin: auto;
    margin-top: 20px;
}

#patient_volume_card > b, #wait_time_card > b {
    line-height: 2.5;
}

#wait_time_card {
    margin: 20px 0px;
}

#patient_volume_hm {
    height: 400px;
}

.table-row:nth-child(even) {
    background-color: #f2f2f2;
}

.row-department > b {
    display: table-cell;
    vertical-align: middle;
}

#header_wait_time_min, #header_care_score {
    display: table;
}

#header_wait_time_min > b, #header_care_score > b {
    display: table-cell;
    vertical-align: middle;
}


/*
  ##Device = Most of the Smartphones Mobiles / ipad (Portrait)
  */

@media only screen and (max-width: 750px), screen and (min-width: 768px) and (max-width: 1024px) {

    body {
        font-size: 13px;
        margin: 0px;
    }

    .banner {
        height: 6rem;
    }

    h5 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 2.5rem;
    }

    #intro {
        margin: 10px 0px;
    }

    #left-column, #right-column {
        width: 100%;
        margin-left: 0px;
    }

    #right-column {
        padding: 0rem 0.5rem;
    }

    #reset-btn-outer {
        text-align: center;
    }

    .table-row > div {
        width: 100% !important;
        text-align: center;
        margin: auto;
    }

    .table-row:nth-child(even), .table-row:nth-child(odd) {
        background-color: #FFFFFF;
    }

    #header {
        display: none;
    }

    #wait_time_table:after {
        content: "";
        display: table;
        clear: both;
    }

    #patient_volume_card > b, #wait_time_card > b {
        line-height: 2.5;
        font-size: 13px;
        display: block;
        text-align: center;
    }

    .annotation-text {
        font-size: 0.8rem !important;
    }

}


/* ==========================================================================
   New Dashboard Styles
   ========================================================================== */

/* Modal */
.modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 400px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
}

.modal-input {
    width: 100%;
    margin-bottom: 15px;
}

.modal-radio {
    margin-bottom: 15px;
}

/* Buttons */
.btn-primary {
    background-color: #119DFF;
    color: white;
    border: 1px solid #119DFF;
}

.btn-primary:hover {
    background-color: #0d8ae0;
    border-color: #0d8ae0;
    color: white;
}

.btn-full-width {
    width: 100%;
    margin-bottom: 10px;
}

.btn-close-tab {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-close-tab:hover {
    background-color: #c82333;
    color: white;
}

/* Dash tab strip */
#tabs-container {
    margin-top: 10px;
}

.tab {
    padding: 10px 20px !important;
    font-size: 15px !important;
}

/* Tab content */
.tab-content-wrapper {
    padding: 10px 16px;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-header h4 {
    margin: 0;
    font-size: 20px;
}

.plot-type-dropdown {
    margin-bottom: 10px;
}

.plot-container {
    text-align: center;
}

/* Plot output */
.plot-img {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
}

/* Loading overlay — blocks all interaction while a callback is running */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 8888;
    background: transparent;
    cursor: wait;
}

/* Plot lightbox overlay */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 40px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    user-select: none;
    font-weight: 300;
    opacity: 0.8;
}

.lightbox-close:hover {
    opacity: 1;
}

.studies-display-dropdown .Select-value-label {
    color: #555 !important;
}

/* Multi-plot grid: max 2 per row */
.plot-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.plot-row-item {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.plot-description {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-top: 8px;
}

.error-message {
    color: red;
}

/* Individual study: combination summary table */
.combo-summary {
    display: inline-block;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
}

.combo-summary-title {
    font-weight: bold;
    font-size: 13px;
    margin: 0 0 6px 0;
}

.combo-summary-table {
    border-collapse: collapse;
    font-size: 13px;
}

.combo-summary-table th,
.combo-summary-table td {
    padding: 3px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.combo-summary-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

/* Individual study: one plot block per combination, 2 per row */
.combo-plots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.combo-plot-item {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

.combo-plot-label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin: 0 0 6px 0;
}

/* Welcome page */
.welcome-overview {
    padding: 20px;
}

.summary-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.summary-card {
    background-color: #f0f8ff;
    border-radius: 8px;
    padding: 15px 25px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-card h3 {
    margin: 0;
    color: #119DFF;
}

.summary-card p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Dataset overview table */
.dataset-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.dataset-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dataset-table thead th {
    position: sticky;
    top: 0;
    background-color: #119DFF;
    color: white;
    padding: 8px 10px;
    text-align: left;
}

.dataset-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

.dataset-table tbody td.td-center {
    text-align: center;
}

.dataset-table tbody td.td-bold {
    font-weight: bold;
}

.dataset-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Statistics tables */
.stats-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    max-height: 400px;
    width: 100%;
}

.stats-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 13px;
}

.stats-table thead th {
    background-color: #119DFF;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th::after {
    content: ' ⇅';
    opacity: 0.5;
    font-size: 11px;
}

.sortable-th[data-sort="asc"]::after {
    content: ' ↑';
    opacity: 1;
}

.sortable-th[data-sort="desc"]::after {
    content: ' ↓';
    opacity: 1;
}

.stats-table tbody td {
    padding: 6px 12px;
    border-bottom: 1px solid #eee;
}

.stats-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stats-table tbody tr:hover {
    background-color: #e8f4fd;
}

/* Dataset browser (left panel) */
.dataset-browser {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.browser-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.browser-pathogen-group {
    margin-bottom: 12px;
}

.browser-pathogen-header {
    background-color: #e8f4fd;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.browser-pathogen-header:hover {
    background-color: #d0eaff;
}

.collapse-indicator {
    display: inline-block;
    width: 1em;
    font-size: 10px;
}

.browser-study-list {
    padding-left: 6px;
}

button.browser-study-item {
    display: block;
    width: 100%;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    height: auto;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

button.browser-study-item:hover {
    background-color: #d0eaff;
    color: #0d6efd;
    border: none;
}

/* Per-tab filter container (wraps studies row + filter bar) */
.tab-filter-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Studies dropdown row (multi-study tabs only) */
.tab-filter-studies-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 0 0 0;
}

.tab-filter-studies-row label {
    font-size: 14px;
    color: #666;
    margin-bottom: 1px;
    display: block;
}

/* Per-tab inline filter bar */
.tab-filter-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 6px;
    padding: 5px 0;
    align-items: flex-start;
}

.tab-filter-item {
    flex: 1 1 0;
    min-width: 0;
}

.tab-filter-item label {
    font-size: 14px;
    color: #666;
    margin-bottom: 1px;
    display: block;
}

/* Collapsed: fixed height, clip overflow */
.tab-filter-item .Select-control {
    height: 36px !important;
    min-height: 36px !important;
    overflow: hidden !important;
}

.tab-filter-item .Select-multi-value-wrapper {
    overflow: hidden !important;
    flex-wrap: nowrap !important;
    max-height: 32px !important;
}

/* Expanded (focused): reveal all selected values */
.tab-filter-item:focus-within .Select-control {
    height: auto !important;
    min-height: 36px !important;
    overflow: visible !important;
}

.tab-filter-item:focus-within .Select-multi-value-wrapper {
    overflow: visible !important;
    flex-wrap: wrap !important;
    max-height: none !important;
}

.tab-filter-radio {
    display: flex;
    gap: 12px;
    padding-top: 6px;
}