/* ========================= */
/* GENERAL LAYOUT ADJUSTMENTS */
/* ========================= */

/* Main dashboard row (removed fixed height to allow expansion) */
.dashboard-main-row {
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

#update-button, #update-button-demo {
    font-size: 4rem;
    margin: 1rem 0;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 100%;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#update-button:hover, #update-button-demo:hover {
    background-color: #357ab8;
}

/* ========================== */
/* FILTER COLUMN              */
/* ========================== */

/* Filter column */
#filter-container > *, #filter-container-demo > * {
    width: 95% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#filter-container, #filter-container-demo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: #f8f9fa;
    border-right: 0.5rem solid #dee2e6;
    padding: 2rem;
    box-sizing: border-box;
    height: 100%;
    min-height: 100vh;
    position: sticky;
    top: 0;
    width: 100%;
}

#filter-container > *, #filter-container-demo > * {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Filter title style */
.filter-title {
    font-size: 5rem;
    margin: 1rem 0 2rem 0;
    color: #2C3E50;
    font-weight: bold;
    width: 100%;
}

/* Filter label */
.filter-label {
    font-size: 4rem;
    color: #6c757d;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    display: block;
    width: 100% !important;
    padding-left: 0 !important;
}

#patient-dropdown, 
.DateRangePicker, 
.recommendation-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Dropdown styling */
.Select, 
.Select-control, 
.Select-menu-outer {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 4rem !important;
    box-sizing: border-box;
}

.Select-control {
    display: flex !important;
    align-items: center !important;
    border-radius: 0.5rem !important;
    height: 8rem !important;
    width: 100% !important;
}

.Select-input {
    width: 100% !important;
}

/* Align the clear button properly */
.Select-clear-zone {
    align-self: center !important;
}

.Select-placeholder, 
.Select--single > .Select-control .Select-value {
    line-height: 8rem !important;
    width: 100% !important;
}

/* ========================== */
/* DATE PICKER                */
/* ========================== */

.DateRangePicker {
    width: 100% !important;
    box-sizing: border-box;
}

.DateRangePickerInput {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    box-sizing: border-box;
}

.DateInput {
    width: 45% !important;
}

.DateInput_input {
    font-size: 4rem !important;
    padding: 1rem;
    border: none;
    height: 8rem;
    text-align: center;
    width: 100% !important;
}

.DateRangePickerInput_arrow {
    padding: 0 1rem;
}

/* Calendar popup */
.DateRangePicker_picker {
    z-index: 1080 !important;
    font-size: 3.5rem;
}

/* ========================== */
/* RECOMMENDATION CARD        */
/* ========================== */

.recommendation-card {
    width: 100% !important;
    border-radius: 0.5rem;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.1);
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    padding: 1rem;
}

.recommendation-count {
    color: #28a745;
    font-weight: bold;
    font-size: 4rem;
    width: 100%;
    margin: 0;
}
/* ========================== */
/* MAIN CONTENT               */
/* ========================== */

.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

#title-container, #title-container-demo {
    background-color: #fff;
    border-bottom: 0.5rem solid #dee2e6;
    margin-bottom: 3rem;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dashboard-title {
    text-align: center;
    color: #2C3E50;
    font-weight: bold;
    font-size: 6rem;
    margin: 0;
}

.initial-message {
    font-size: 4.5rem;
    font-weight: bold;
    text-align: center;
    margin-top: 5rem;
    color: #6c757d;
}

.content-container {
    padding: 0 2rem;
}

/* ========================== */
/* DASHBOARD CARDS            */
/* ========================== */

.dashboard-card {
    padding: 2.5rem;
    border-radius: 0.8rem;
    background-color: #ffffff;
    margin-bottom: 3rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}

.dashboard-card:hover {
    box-shadow: 0 0.8rem 2rem rgba(0,0,0,0.12);
}

.card-title {
    font-size: 4.5rem;
    font-weight: bold;
    color: #2C3E50;
    margin: 0;
}

/* Flexbox for card headers */
.d-flex.align-items-center.mb-2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ========================== */
/* TABLES                     */
/* ========================== */

.recommendations-table-container {
    width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
    border-radius: 0.5rem;
}

#recommendations-table-container table,
#recommendations-table-container-demo table {
    width: 100%;
    border-collapse: collapse;
    font-size: 4rem;
}

#recommendations-table-container table th,
#recommendations-table-container-demo table th {
    background-color: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
    color: #2C3E50;
    border: 1px solid #dee2e6;
}

#recommendations-table-container table td,
#recommendations-table-container-demo table td {
    padding: 1.5rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid #dee2e6;
}


/* ========================== */
/* DETAILS SECTIONS           */
/* ========================== */

.details-subtitle {
    font-weight: bold;
    font-size: 4.5rem;
    color: #2C3E50;
    margin-top: 4rem;
    margin-bottom: 2rem;
    border-left: 0.5rem solid #4a90e2;
    padding-left: 1.5rem;
}

.details-message {
    font-size: 4rem;
    color: #6c757d;
    line-height: 1.5;
    padding: 1rem;
}

.rec-details-link {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    margin-left: 0.5rem;
    font-size: 3rem;
    font-style: italic;
}

/* ========================== */
/* ICONS AND INFO BOXES       */
/* ========================== */

.export-icon {
    cursor: pointer;
    font-size: 4rem;
    color: #4a90e2;
    margin-left: auto;
    transition: color 0.3s, transform 0.2s;
}

.export-icon:hover {
    color: #357ab8;
    transform: scale(1.1);
}

.info-box, .dashboard-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    font-size: 3.5rem;
    background-color: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #dee2e6;
    transition: background-color 0.3s;
}

.info-box:hover, .dashboard-info-button:hover {
    background-color: #e9ecef;
}

/* ========================== */
/* MODALS                     */
/* ========================== */

.modal-content {
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    padding: 3rem;
}

.dashboard-wide-modal .modal-content {
    max-width: 150rem;
    margin: 0 auto;
}

.modal-title {
    font-size: 5rem;
    font-weight: bold;
    color: #2C3E50;
}

.modal-text {
    font-size: 4rem;
    color: #4A4A4A;
    line-height: 1.5;
}

.modal-text-details {
    font-size: 4rem;
    color: #4A4A4A;
    line-height: 1.5;
    margin: 2rem, 2rem, 2rem, 3rem;
}

.modal-header {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 2rem;
}

.modal-footer {
    border-top: 1px solid #eaeaea;
    padding-top: 2rem;
}

.dashboard-info-close-button {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: white;
    font-size: 4rem;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.dashboard-info-close-button:hover {
    background-color: #357ab8;
    border-color: #357ab8;
}

/* ========================== */
/* EXPORT MODAL STYLING       */
/* ========================== */

#export-item-dropdown, 
#export-format-dropdown,
#export-item-dropdown-demo, 
#export-format-dropdown-demo {
    font-size: 4rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    margin: 1rem 0 2rem 0;
    width: 100%;
}

#export-select-item, 
#export-select-format,
#export-select-item-demo, 
#export-select-format-demo {
    font-size: 4rem;
    font-weight: 600;
    color: #2C3E50;
    margin: 2rem 0 1rem 0;
}

/* ========================== */
/* LEGEND AND INFO STYLING    */
/* ========================== */

.dashboard-info-legend {
    font-size: 4rem;
    line-height: 1.6;
    max-width: 150rem;
    text-align: justify;
    margin-bottom: 3rem;
    color: #4A4A4A;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.dashboard-info-legend-title {
    font-size: 5rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: #2C3E50;
    font-weight: bold;
}

.dashboard-status-text {
    font-size: 4rem;
    font-weight: bold;
}

/* ========================== */
/* ACCORDION STYLING          */
/* ========================== */

.accordion-title {
    font-size: 4.5rem;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: none !important;
}

.accordion-button {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
    font-size: 4.5rem;
    padding: 2rem;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa !important;
    color: #2C3E50;
}

.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-item-text {
    font-size: 4.5rem !important;
    min-height: 5rem;
    padding: 1.5rem;
    border-radius: 0;
}

.accordion-header {
    font-size: 5rem;
}

.accordion-body {
    font-size: 4rem;
    max-height: 50rem;
    overflow-y: auto;
    padding: 2rem;
    background-color: #ffffff;
}

/* ========================== */
/* GRAPHS STYLING             */
/* ========================== */

.js-plotly-plot {
    width: 100% !important;
}

.js-plotly-plot .main-svg {
    font-size: 3.5rem !important;
}

/* ========================== */
/* RESPONSIVE ADJUSTMENTS     */
/* ========================== */

@media (max-width: 1200px) {
    #filter-container, #filter-container-demo {
        width: 25% !important;
    }
    
    .main-content {
        width: 75% !important;
    }
}

@media (max-width: 768px) {
    .dashboard-main-row {
        flex-direction: column;
    }
    
    #filter-container, #filter-container-demo {
        width: 100% !important;
        min-height: auto;
        border-right: none;
        border-bottom: 0.5rem solid #dee2e6;
    }
    
    .main-content {
        width: 100% !important;
    }
}