/* Reset margin and padding, and ensure 100% height for the entire page */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
}



/* The wrapper is a flex container, with column direction */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure it spans the full viewport height */
}

/* Main content should grow to fill the available space */
main {
    flex-grow: 1; /* This allows the main content to expand and push the footer down */
    padding: 20px;
}


.content {
    margin-left: auto;
    margin-right: auto;
    max-width: 950px;
    text-align: center;
}

.model-description-list {
    text-align: left;
}

.copy {
    line-height: 1.75rem;
    font-size: 1.1rem;
}

/* /\* Map page layout *\/ */
/* .map-layout { */
/*     display: flex; */
/*     flex-direction: column; */
/*     gap: 16px; */
/*     align-items: stretch; */
/* } */


/* Mobile-first: column layout (already what you have) */
.map-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

/* On wider screens, use a two-column layout */
@media (min-width: 900px) {
    .map-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .map-panel {
        flex: 2 1 0;
    }

    .charts-panel {
        flex: 1 1 0;
    }
}


.map-panel,
.charts-panel {
    min-width: 50%;
}

/* .map-canvas { */
/*     width: 100%; */
/*     height: 520px; */
/*     border-radius: 8px; */
/*     overflow: hidden; */
/*     box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
/* } */

.map-canvas {
    width: 100%;
    /* Try using viewport height, with a max cap */
    height: min(60vh, 520px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


.charts-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 280px;
}

.model-selector-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 12px auto;
    width: 100%;
}

.model-selector-mobile {
    display: none;
    margin: 0;
    max-width: 360px;
    text-align: left;
    width: auto;
}

.model-selector-long {
    display: flex;
    justify-content: center;
}

.model-selector-desktop {
    margin: 12px 0;
}

/* Wider container for two-column pages like the map */
.wide-content {
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px; /* keep desktop width closer to charts */
}

.topnav {
    background-color: #87CEEB;
    overflow: hidden;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping to prevent overflow */
}

.topnav a {
    color: #333333;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
    font-size: 18px;
}

.topnav a.active {
    font-weight: bold;
}

.topnav .auth-buttons {
    margin-left: auto; /* Pushes the auth buttons to the right */
    display: flex;
    gap: 10px; /* Space between buttons */
}

.topnav .hamburger {
    display: none;
    margin-left: 12px;
}

.drawer-links {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-links a {
    color: #333333;
    text-decoration: none;
    font-size: 18px;
}

.drawer-auth {
    padding: 0 16px 16px 16px;
}

.search-box {
    margin: auto;
}

/* Location link styling (consistent color, underline on hover only) */
a.location-link,
a.location-link:link,
a.location-link:active,
a.location-link:visited {
    color: #1d4ed8; /* blue link color */
    text-decoration: none;
}
a.location-link:hover,
a.location-link:focus {
    text-decoration: underline;
}


/* Footer styling */
footer {
    background-color: #87CEEB;
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid #ccc; /* Optional: adds a subtle top border */
}

/* Ensure links are styled appropriately */
footer a {
    color: #333333; /* color for text */
    text-decoration: none;
    margin: 10px;
}

/* Space below charts */
.echarts-for-react {
  padding-bottom: 25px;
}
#longChart {
  padding-bottom: 25px;
}



/* Ensure the layout adapts on smaller devices */
@media (max-width: 600px) {
    footer {
        font-size: 0.8em;
        padding: 15px;
    }
}

@media (max-width: 640px) {
    .model-selector-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .model-selector-desktop {
        display: none;
    }
}


@media (max-width: 768px) {
  .topnav .links { display: none; }
  .topnav .hamburger { display: inline-flex; margin-left: auto; }
  .topnav .auth-buttons { display: none; }
}
