/* nav bar and color palette inspired by plotly.com/examples SARIMA Tuner */
/* content inspired by https://monitormywatershed.org/sites/WC001/   */
/* Color Variables */
:root {
    --color-primary: #3DED97;
    --color-background-start: rgb(15, 57, 72);
    --color-background-end: rgb(63, 123, 112);
    --color-text: #f6f6f6;
    --color-card-bg: rgba(255, 255, 255, 0.05);
    --color-hover-bg: rgba(255, 255, 255, 0.2);
    --color-header-bg: rgba(13, 202, 240, 0.1);
    --color-nav-active: #042f33;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: var(--color-text) !important;
}

html, body {
    height: 100vh;
    background-image: linear-gradient(109.6deg, var(--color-background-start) 11.2%, var(--color-background-end) 91.1%);
    overflow-x: hidden;
    font-size: 18px;
}

/* Nav Menu Styles */
.nav-logo {
    padding: 23px 1px 1px 1px;
    text-align: center;
    text-shadow: 0px 0px 50px var(--color-primary);
}

.nav-text {
    font-size: 35px;
    font-weight: 200;
    text-shadow: 0px 0px 50px var(--color-primary);
}

.nav-menu {
    font-size: 18px !important;
}

.nav-pills .nav-link.active {
    background-color: var(--color-nav-active);
}

/* Plot Grid Styles */
.plot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
}

/* Plot Cards Styles */
.plot-card-container {
    padding: 15px;
}

.plot-card {
    background: var(--color-card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.plot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: var(--color-header-bg);
    padding: 15px;
    border-radius: 10px 10px 0 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.plot-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    color: var(--color-text);
}

.provisional-tag {
    background: var(--color-hover-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.btn-view-full {
    padding: 6px 12px;
    background: var(--color-card-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
    white-space: nowrap;
    margin-left: auto;
}

.btn-view-full:hover {
    background: var(--color-hover-bg);
}

/* Plot Container Styles */
.plot-container {
    padding: 15px;
}

.graph-container {
    background-color: rgba(0,0,0,0.11);
    border-radius: 11px;
}

/* Info Table Styles */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.info-label {
    font-weight: bold;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    width: 30%;
}

.info-value {
    padding: 8px;
}

/* Loading Spinner Styles */
.dash-spinner {
    border-color: var(--color-primary) !important;
    border-right-color: transparent !important;
}

/***********************************************************************************************/
/************************************ MODAL STYLES *********************************************/
/***********************************************************************************************/
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-graph {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.modal-content {
    position: relative;
    background: var(--color-card-bg);
    margin: 20px auto;
    width: 90%;
    max-width: 1400px;
    border-radius: 8px;
    height: 90vh;  
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--color-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-close-btn {
    font-size: 24px;
    border: none;
    background: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 5px 10px;
}

.modal-body {
    padding: 20px;
    flex: 1;  /* Allow body to take remaining space */
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;  /* Prevent scrolling */
}

.date-picker-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.modal-plot-container {
    flex: 1;  /* Take remaining space */
    min-height: 0;  /* Important for flexbox to work properly */
    position: relative;
}

.DateInput_input {
    color: black !important;  /* Make input text black */
    background-color: white !important;  /* Make background white */
}

.DateRangePickerInput {
    background-color: white !important;  /* Make sure container is also white */
}

/* Simple fix for date picker visibility */
.CalendarMonth_caption strong,     /* Month name */
.DayPicker_weekHeader_li,         /* Days of week */
.CalendarDay__default {           /* Calendar day numbers */
    color: black !important;
}

/***********************************************************************************************/
/************************************ ABOUT PAGE ***********************************************/
/***********************************************************************************************/
/* General table text color override */
.table td {
    color: black !important; /* Ensure all table text is black */
}

/* Specific styling for the first column (key column) */
.table td:first-child {
    color: black !important; /* set text in column 1 to black */
    font-weight: bold; 
    display: flex; /* Align icon and text inline */
    align-items: center; /* Vertically center icon and text */
    gap: 8px; /* Add spacing between the icon and the text */
}

/* Ensure icons inside the first column are black */
.table td:first-child .fa {
    color: gray !important; /* Apply black color to Font Awesome icons */
    font-size: 16px; /* Adjust icon size if necessary */
}

/* Ensure the first column's text (excluding icons) is black */
.table td:first-child span {
    color: black !important; /* Force the text itself to be black */
}

/* Tooltip styling */
.map-tooltip {
    color: black !important; /* Ensure tooltips remain visible in black */
}

/* Override map controls to match the table */
.leaflet-container {
    color: black !important;
}

/* Ensure zoom controls are visible */
.leaflet-control-zoom a {
    color: black !important;
}


.leaflet-bar a {
    color: black !important;
}

/* Target the specific elements inside the zoom control */
.leaflet-control-zoom-in span,
.leaflet-control-zoom-out span,
.leaflet-control-zoom a {
    color: black !important;
}

/* Ensure + and - characters are black */
.leaflet-control-zoom-in:after,
.leaflet-control-zoom-out:after {
    color: black !important;
}

/* Media Queries */

/* Stack vertically for screens 1920px or smaller */
@media (max-width: 1920px) {
    .responsive-row > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Display side by side for screens larger than 1920px */
@media (min-width: 1921px) {
    .responsive-row > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}


/***********************************************************************************************/
/************************************ ANALYTICS PAGE *******************************************/
/***********************************************************************************************/

/* Analytics Page Specific Styles */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Style the dropdowns to match theme */
.Select-control {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-primary) !important;
}

.Select-menu-outer {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-primary) !important;
}

.Select-value-label {
    color: var(--color-text) !important;
}