.glass {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2), inset 0 4px 20px rgba(255, 255, 255, 0.3);
}

.glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    backdrop-filter: blur(3px);
    filter: url(#glass-distortion);
    overflow: hidden;
    isolation: isolate;
    box-shadow: inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
        inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
    opacity: 0.6;
    z-index: -1;
    inset: 0;
    /* filter: blur(1px) drop-shadow(10px 4px 6px black) brightness(115%); */
}

/* ======================== */
/* MAP PARAMETER TABS (Current Conditions) */
/* ======================== */
.map-parameter-tabs {
    background: linear-gradient(
        180deg,
        var(--color-gradient-start) 20%,
        var(--color-gradient-end) 100%
    );
    border-radius: var(--border-radius);
    margin: 0 0 10px 0;
    padding: 0;
}

.map-parameter-tab-labels {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid var(--color-primary, #007acc);
}

.map-parameter-tab {
    flex: 1;
    min-width: 100px;
    background-color: var(--color-background);
    color: var(--color-text, #333);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.95em;
    padding: 10px 6px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
}

.map-parameter-tab:first-child {
    border-radius: 8px 0 0 0;
}
.map-parameter-tab:last-child {
    border-radius: 0 8px 0 0;
}
.map-parameter-tab:hover {
    background-color: var(--color-accent);
    color: var(--color-text, #333);
}

input[name='mapParameterTab'] {
    display: none;
}

#tab-temp:checked ~ .map-parameter-tab-labels label[for='tab-temp'],
#tab-wind:checked ~ .map-parameter-tab-labels label[for='tab-wind'],
#tab-humidity:checked ~ .map-parameter-tab-labels label[for='tab-humidity'],
#tab-dewpoint:checked ~ .map-parameter-tab-labels label[for='tab-dewpoint'] {
    background-color: var(--color-primary, #007acc);
    color: var(--color-text-light, #ffffff);
    font-weight: bold;
}

#tab-temp:checked ~ .map-parameter-tab-labels label[for='tab-temp']::after,
#tab-wind:checked ~ .map-parameter-tab-labels label[for='tab-wind']::after,
#tab-humidity:checked ~ .map-parameter-tab-labels label[for='tab-humidity']::after,
#tab-dewpoint:checked ~ .map-parameter-tab-labels label[for='tab-dewpoint']::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-accent, #ff6b35);
}

.wind-arrow-icon {
    fill: yellow;
    font-size: 2.5rem;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
    pointer-events: none; /* clicks pass through to number */
    paint-order: stroke fill;
    stroke: #000;
    stroke-width: 6px; /* creates bold edge for visibility */
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .map-parameter-tab {
        font-size: 0.8rem;
        padding: 6px 4px;
        min-width: 70px;
    }
}
/*--------------------*/
/* INDEX PAGE STYLES */
/*--------------------*/

/* ======================== */
/* BASE STYLES */
/* ======================== */
body {
    background: linear-gradient(
        180deg,
        var(--color-gradient-start) 20%,
        var(--color-gradient-end) 100%
    );
    max-width: 100vw;
    overflow-x: hidden;
}

html {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ======================== */
/* LAYOUT CONTAINERS */
/* ======================== */

/* Main layout container - side by side on desktop, stacked on mobile */
.cc-layout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.rt-layout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

@media (min-width: 1199px) {
    .rt-layout-container {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
    }
}

/* Desktop layout - side by side */
@media (min-width: 769px) {
    .cc-layout-container {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: var(--margin-section, 20px);
        margin-top: var(--margin-section, 20px);
        margin-bottom: var(--margin-section, 20px);
    }

    /* First row: 75% map, 25% legend */
    .cc-layout-container:first-of-type {
        grid-template-columns: 3fr 1fr;
    }

    /* Second row: equal split */
    .cc-layout-container:last-of-type {
        grid-template-columns: 1fr 1fr;
    }
}

/* ======================== */
/* SHARED COMPONENTS */
/* ======================== */

/* Container Base Styles */
.map-container,
.alerts-legend-container,
.tropical-container,
.radsat-container {
    padding: var(--padding-section);
    margin: 0;
    color: var(--color-text-light);
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Title Styles - Shared across sections */
.tropical-title,
.current-title,
.storm-header-title,
.radsat-title {
    font-size: clamp(1rem, 2.5vw, 2rem);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.tropical-title i,
.current-title i,
.storm-header-title i,
.radsat-title i {
    margin-right: 15px;
    color: var(--color-accent);
}

.tropical-title h2,
.current-title h2,
.storm-header-title h2,
.radsat-title h2 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
}

/* Content Containers */

.current-content {
    background-image: url('../images/hatteras_bg.webp');
    background-size: cover;
    height: clamp(350px, 55vh, 600px);
    /* max-height: 45vh; */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.radsat-content,
.tropical-content {
    border-radius: 5px;
    color: var(--color-text);
    padding: var(--padding-section);
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.tropical-content {
    text-align: center;
    padding: 15px;
    border-radius: 5px;
    color: var(--color-text);
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.tropical-image-container {
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(325px, 40vw, 700px);
    margin: 0 auto;
}

/* Unified image styling (tropical + radar/satellite) now relies on container for sizing */
.tropical-outlook-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 5px;
    background-color: #f5f5f5;
}

/* ======================== */
/* ALERTS LEGEND SECTION */
/* ======================== */

.alerts-legend-container .map-legend {
    background-color: rgb(197, 197, 197);
    color: rgb(62, 62, 62);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    width: 100%;
    margin: 1.5em 0;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    font-weight: 600;
    text-transform: uppercase;
    box-sizing: border-box;
}

/* Hide alerts container when no alerts */
.alerts-legend-container:empty,
.alerts-legend-container .map-legend:empty {
    display: none;
}

/* When alerts are hidden, let map expand */
@media (min-width: 1200px) {
    .cc-layout-container:first-of-type:has(.alerts-legend-container:empty) {
        grid-template-columns: 1fr;
    }

    .cc-layout-container:first-of-type:has(.alerts-legend-container .map-legend:empty) {
        grid-template-columns: 1fr;
    }
}

/* ======================== */
/* MAP SECTION */
/* ======================== */
.map-container {
    background-color: rgba(0, 119, 204, 0.7);
}

.current-condition-heading {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.county-map-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* .map-legend {
    background-color: rgb(197, 197, 197);
    color: rgb(62, 62, 62);
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 98%;
    margin: 0 10px 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    box-sizing: border-box;
} */

#legend-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 3px;
    border-bottom: 1px solid #333;
}

/* Weather markers */
.marker-temp {
    transition: transform 0.2s ease;
    text-shadow: 5px 5px 3px rgba(0, 0, 0, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    fill: yellow;
    cursor: pointer;
    paint-order: stroke fill;
    stroke: #000;
    stroke-width: 6px; /* creates bold edge for visibility */
    stroke-linejoin: round;
}

.marker-calm {
    font-size: 2.5rem !important; /* much smaller than regular wind speed numbers */
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6);
}

.marker-label {
    text-transform: uppercase;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1.5rem;
    padding-top: 10px;
    font-weight: 800;
    text-shadow: 4px 4px 3px rgba(0, 0, 0, 1);
    cursor: pointer;
    paint-order: stroke fill;
    stroke: #000;
    stroke-width: 6px; /* creates bold edge for visibility */
    stroke-linejoin: round;
}

#nc-county-map {
    width: 100%;
    height: 100%;
}

#nc-county-map svg {
    width: 100%;
    height: 100%;
}

/* County paths */
.counties path {
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.counties path:hover {
    opacity: 0.8;
}

/* ======================== */
/* TROPICAL SECTION */
/* ======================== */
.tropical-container {
    min-width: 300px;
}

/* Tropical Alert Banner */
.tropical-alert-banner {
    background-color: #940000;
    color: #ffffff;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 9999;
    width: 100%;
    box-sizing: border-box;
}

.tropical-alert-banner.in-content {
    margin-bottom: 20px;
    margin-top: 0;
}

.tropical-alert-banner i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.tropical-alert-banner a {
    color: #fff200;
    margin-left: 5px;
    text-decoration: underline;
}

.tropical-alert-banner button {
    background: none;
    border: none;
    color: #ffffff;
    margin-left: auto;
    cursor: pointer;
    padding: 0 5px;
}

/* ======================== */
/* RADAR/SATELLITE SECTION */
/* ======================== */
.radsat-container {
    min-width: 300px;
}

.radsat-tabs {
    border-radius: var(--border-radius);
}

/* Tab Labels Container */
.radsat-tab-labels {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    border-radius: 8px 8px 0 0;
}

/* Individual Tab Buttons */
.radsat-tab {
    flex: 1;
    min-width: 120px;
    background-color: var(--color-background);
    color: var(--color-text, #333);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9em;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
}

.radsat-tab:first-child {
    border-radius: 8px 0 0 0;
}

.radsat-tab:last-child {
    border-radius: 0 8px 0 0;
}

.radsat-tab:hover {
    background-color: var(--color-accent);
    color: var(--color-text, #333);
}

/* Hidden radio inputs for tab functionality */
input[name='radsatTab'] {
    display: none;
}

/* Active tab styling */
#radar-tab:checked ~ .radsat-tab-labels label[for='radar-tab'],
#satellite-tab:checked ~ .radsat-tab-labels label[for='satellite-tab'] {
    background-color: var(--color-primary, #007acc);
    color: var(--color-text-light, #ffffff);
    font-weight: bold;
}

/* Active tab accent bar */
#radar-tab:checked ~ .radsat-tab-labels label[for='radar-tab']::after,
#satellite-tab:checked ~ .radsat-tab-labels label[for='satellite-tab']::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-accent, #ff6b35);
}

/* Tab Panels */
.radsat-panel {
    display: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    color: var(--color-text);
    overflow-x: hidden;
    max-width: 100%;
}

/* Show active tab content */
#radar-tab:checked ~ .radsat-tab-content #radar-panel,
#satellite-tab:checked ~ .radsat-tab-content #satellite-panel {
    display: block;
}

/* ======================== */
/* TROPICAL SECTION */
/* ======================== */
.tropical-container {
    min-width: 300px;
}

.tropical-tabs {
    border-radius: var(--border-radius);
}

/* Tab Labels Container */
.tropical-tab-labels {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    border-radius: 8px 8px 0 0;
}

/* Individual Tab Buttons */
.tropical-tab {
    flex: 1;
    min-width: 120px;
    background-color: var(--color-background);
    color: var(--color-text, #333);
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9em;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
}

.tropical-tab:first-child {
    border-radius: 8px 0 0 0;
}

.tropical-tab:last-child {
    border-radius: 0 8px 0 0;
}

.tropical-tab:hover {
    background-color: var(--color-accent);
    color: var(--color-text, #333);
}

/* Hidden radio inputs for tab functionality */
input[name='tropicalTab'] {
    display: none;
}

/* Active tab styling */
#tropical-atlantic-tab:checked ~ .tropical-tab-labels label[for='tropical-atlantic-tab'],
#tropical-pacific-tab:checked ~ .tropical-tab-labels label[for='tropical-pacific-tab'] {
    background-color: var(--color-primary, #007acc);
    color: var(--color-text-light, #ffffff);
    font-weight: bold;
}

/* Active tab accent bar */
#tropical-atlantic-tab:checked ~ .tropical-tab-labels label[for='tropical-atlantic-tab']::after,
#tropical-pacific-tab:checked ~ .tropical-tab-labels label[for='tropical-pacific-tab']::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-accent, #ff6b35);
}

/* Tab Panels */
.tropical-panel {
    display: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    color: var(--color-text);
    overflow-x: hidden;
    max-width: 100%;
}

/* Show active tab content */
#tropical-atlantic-tab:checked ~ .tropical-tab-content #tropical-atlantic-panel,
#tropical-pacific-tab:checked ~ .tropical-tab-content #tropical-pacific-panel {
    display: block;
}


/* Image Container */
/* Radar/Satellite image frame now controls width instead of the image */
.image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(400px, 40vw, 600px);
    margin: 0 auto;
    text-align: center;
    padding: 0.7em;
}

.trop-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(500px, 40vw, 700px);
    margin: 0 auto;
    text-align: center;
    padding: 0.7em;
}

/* Weather/radar/satellite images share same intrinsic behavior */
.weather-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 5px;
    background-color: #f5f5f5;
}

/* ======================== */
/* ANIMATIONS */
/* ======================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ======================== */
/* RESPONSIVE DESIGN */
/* ======================== */

/* Tablet and smaller - stack containers */
@media (max-width: 1199px) {
    .cc-layout-container {
        flex-direction: column;
        gap: 5px;
    }

    .map-container,
    .alerts-legend-container,
    .radsat-container,
    .tropical-container {
        width: 100%;
        min-width: 0;
    }

    /* Adjust container widths for medium screens */
    .image-container {
        width: clamp(300px, 70vw, 600px);
    }
    .tropical-image-container {
        width: clamp(325px, 70vw, 700px);
    }
}

@media (max-width: 1024px) {
    .current-content {
        height: clamp(300px, 40vh, 350px);
        max-height: 40vh;
    }
}

@media (max-width: 768px) {
    .current-content {
        min-height: clamp(250px, 75vh, 350px);
    }

    .map-container,
    .tropical-container {
        width: 100%;
    }

    .tropical-title h2,
    .current-title h2,
    .storm-header-title h2,
    .radsat-title h2 {
        text-transform: uppercase;
    }

    .radsat-tab {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    .alerts-legend-container .map-legend {
        margin: 0;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .current-content {
        min-height: clamp(200px, 75vh, 300px);
        padding: 0.5rem;
    }

    .county-label,
    .label-background,
    .marker-label {
        display: none;
    }

    .marker-temp {
        font-size: 5rem;
    }

    #legend-title {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }



    .radsat-image-container,
    .radsat-content {
        padding: 5px;
    }

    .radsat-tab {
        text-align: center;
    }
}
