@layer pages {
/*=================================================================*/
/*                        ACTIVE PAGE STYLES                      */
/*                       Scope: /active/index.html                */
/*=================================================================*/

/*-----------------------------------------------------------------*/
/* BASE & ROOT STYLES                                              */
/*-----------------------------------------------------------------*/
.site-page--active {
    --page-title-color: gold;
    --page-title-weight: 800;
    --page-title-shadow: 4px 4px 0 rgba(0, 0, 0, 0.98);
    background:
        linear-gradient(rgba(103, 103, 103, 0.7), rgba(103, 103, 103, 0.7)),
        url('../../images/milton_bg.webp') center / cover fixed;
    color: #edf6fb;

    /* Map Label Priorities (1-10 scale) */
    --map-label-priority-1: 9;
    --map-label-priority-2: 9.4;
    --map-label-priority-3: 9.9;
    --map-label-priority-4: 10.3;
    --map-label-priority-5: 10.8;
    --map-label-priority-6: 11.2;
    --map-label-priority-7: 11.6;
    --map-label-priority-8: 12;
    --map-label-priority-9: 12.5;
    --map-label-priority-10: 13;

    /* Map Label Colors */
    --map-label-color-1: #ffffff;
    --map-label-color-2: #ffffff;
    --map-label-color-3: #ffffff;
    --map-label-color-4: #ffffff;
    --map-label-color-5: #ffffff;
    --map-label-color-6: #ffffff;
    --map-label-color-7: #ffffff;
    --map-label-color-8: #ffffff;
    --map-label-color-9: #ffe600;
    --map-label-color-10: #ffee00;

    /* Base visibility for map labels */
    --map-label-min-priority: 5;
}

.glass {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px) saturate(180%);
    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%); */
}

/*-----------------------------------------------------------------*/
/* SHARED CONTAINER STYLES                                        */
/*-----------------------------------------------------------------*/
.storm-header-container,
.active-satellite-container,
.radii-container,
.wind-analysis-container,
.hazards-container,
.surge-container,
.graphics-container,
.wind-graphics-container,
.wind-probability-container,
.surge-rain-container,
.text-products-container {
    color: var(--color-text-light);
    margin: var(--section-margin);
    padding: var(--section-padding);
}

.section-title-active {
    font-family: var(--font-active);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-style: italic;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
}

.storm-header-container .section-title::after {
    display: none;
}

.storm-header-section,
.active-satellite-section,
.storm-hazards-section,
.storm-surge-section,
.storm-text-section,
.radii-section,
.wind-analysis-section,
.track-messages-section,
.wind-graphics-section,
.wind-probability-section,
.surge-rain-section {
    margin: 15px 0 0 0;
    padding: 1em clamp(0.3em, 1vw, 1.3em) clamp(0.3em, 1vw, 1.3em) clamp(0.3em, 1vw, 1.3em);
}

.storm-header-section,
.active-satellite-section {
    min-height: clamp(500px, 50vh, 600px);
}

.storm-hazards-section,
.storm-surge-section {
    min-height: clamp(900px, 65vh, 1000px);
}

.storm-text-section,
.track-messages-section {
    min-height: clamp(600px, 60vh, 800px);
}

.radii-section,
.wind-analysis-section {
    min-height: clamp(650px, 60vh, 800px);
}

.wind-graphics-section,
.wind-probability-section {
    min-height: clamp(620px, 50vh, 700px);
}


/*-----------------------------------------------------------------*/
/* HEADER & OVERVIEW                                              */
/*-----------------------------------------------------------------*/
.storm-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
}

.storm-header .section-title,
.storm-header .map-title {
    margin: 0;
    line-height: 1.1;
}

/* .overview-v2 {
  text-align: center;
} */

#overview-v2 {
    font-family: var(--font-active);
    display: flex;
    width: 100%;
    flex-direction: column;

    gap: 0.5rem;
}

.ov-info-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    line-height: 1.3;
}

.ov-info-line .ov-label {
    font-weight: 700;
    margin-right: 0.25rem;
    min-width: fit-content;
}

.ov-info-line .ov-value {
    font-weight: 400;
    flex: 1;
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "MESSAGE TYPE"                               */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='message-type'] {
    border-bottom: var(--color-accent, #fff200) 2px solid;
    margin: 0 0 0.5rem 0;
}

.overview-v2 .ov-info-line[data-key='message-type'] .ov-value {
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--font-accent, #fff200);
    margin: 0 0 0.5rem 0;
    text-shadow: var(--shadow-standard);
    text-align: center;
}

.overview-v2 .message-type-text {
    font-size: clamp(1rem, 2vw, 1.5rem);
    text-transform: uppercase;
}

.overview-v2 [data-key='advisory-number'] {
    font-size: clamp(1rem, 2vw, 1.5rem);
    padding: 0 0 0 0.2rem;
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "HEADLINES"                               */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-headlines-block[data-key='nhc-headlines-block'] {
    border-bottom: var(--color-accent, #fff200) 2px solid;
    padding: 0 0 0.5rem 0;
    margin: 0 0 0.5rem 0;
}

.overview-v2 .ov-headlines-content {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    font-weight: 600;
    font-style: italic;
    text-shadow: var(--shadow-standard);
    text-align: center;
    padding: 0 10px;
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "CATEGORY"                                   */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='category'] .ov-label {
    display: none;
}

.overview-v2 .ov-info-line[data-key='category'] .ov-value {
    font-family: var(--font-active);
    text-transform: uppercase;
    font-size: clamp(2rem, 2.5vw, 4rem);
    font-weight: 900;
    text-shadow: var(--shadow-standard);
    color: red;
}

.overview-v2 .ov-info-line[data-key='issued'] .ov-label,
.overview-v2 .ov-info-line[data-key='location'] .ov-label,
.overview-v2 .ov-info-line[data-key='max-wind'] .ov-label,
.overview-v2 .ov-info-line[data-key='min-pressure'] .ov-label,
.overview-v2 .ov-info-line[data-key='direction'] .ov-label,
.overview-v2 .ov-info-line[data-key='speed'] .ov-label
{
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR DATE, "ISSUED"                               */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='issued'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='issued'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='issued'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "LOCATION"                               */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='location'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='location'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='location'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "MAX WIND"                                   */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='max-wind'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='max-wind'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='max-wind'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "MIN PRESSURE"                                   */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='min-pressure'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='min-pressure'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='min-pressure'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "DIRECTION"                                   */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='direction'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='direction'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='direction'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "SPEED"                                   */
/*-----------------------------------------------------------------*/
.overview-v2 .ov-info-line[data-key='speed'] .ov-value {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-style: italic;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0 0.5rem 0 0;
    text-shadow: var(--shadow-standard);
}

.overview-v2 .ov-info-line[data-key='speed'] .ov-label {
    font-style: normal;
}

.overview-v2 .ov-info-line[data-key='speed'] .ov-value {
    color: var(--color-accent, #fff200);
    text-shadow: var(--shadow-standard);
}

/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "CENTER LOCATION"                            */
/*-----------------------------------------------------------------*/
.ov-center-section {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0 0 0;
    text-shadow: var(--shadow-standard);
    border-top: var(--color-accent, #fff200) 2px solid;
    line-height: 1.2;
    text-align: center;
}


/*-----------------------------------------------------------------*/
/* SPECIAL STYLES FOR "NHC LINK"                            */
/*-----------------------------------------------------------------*/
.ov-nhc-link-block {
  margin-top: 0.5em;
  text-align: center;
}

/*-----------------------------------------------------------------*/
/* ACTIVE SATELLITE CONTROLS                                       */
/*-----------------------------------------------------------------*/
.active-satellite-interface {
    overflow: hidden;
}

.active-satellite-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    margin: 0;
    gap: 0;
}
.active-satellite-controls-play-pause {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}
.active-satellite-play-pause-button {
    background-color: var(--color-text);
    color: var(--color-accent);
    border: var(--color-accent) 2px solid;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 5px;
}
.active-satellite-play-pause-button:hover {
    background: var(--color-text-light);
    color: var(--color-primary);
}
.active-satellite-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 1em;
}
/* .active-satellite-image-container {
  width: 100%;
  max-width: 700px;
  min-height: clamp(300px, 50vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
} */

.active-satellite-image-container {
    width: 100%;
    max-width: 700px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

/* .active-satellite-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
} */

.active-satellite-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.image-timestamp {
    position: relative;
    text-align: center;
    font-weight: bold;
    background-color: rgba(238, 238, 238, 0.7);
    color: rgb(0, 0, 0);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}
/*-----------------------------------------------------------------*/
/* WATCHES & WARNINGS (WIND/SURGE)                                */
/*-----------------------------------------------------------------*/
.ww-grid .ww-mapcol canvas {
    border-radius: 25px;
}

.ww-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
}

.ww-grid .ww-mapcol,
.ww-grid .ww-textcol {
    min-width: 0;
}

.ww-grid .ww-mapcol canvas {
    display: block;
    width: 100%;
    height: auto;
}

#ww-wind-text-empty,
#ww-surge-text-empty {
    font-family: var(--font-active);
    font-size: clamp(1rem, 2.5vw, 3rem);
    font-weight: 800;
    text-align: center;
    opacity: 0.8;
}

/*-----------------------------------------------------------------*/
/* TEXT PRODUCTS TABBED INTERFACE                                 */
/*-----------------------------------------------------------------*/
.text-products-interface {
    /* background-color: var(--color-background); */
    overflow: hidden;
    padding-bottom: 1em;
}

.tab-name {
    display: block;
    margin-bottom: 2px;
}

.tab-desc {
    display: block;
    font-size: 0.75em;
    opacity: 0.8;
    line-height: 1.2;
}

.text-content-container {
    min-height: 400px;
    position: relative;
}

.text-content-panel {
    height: 100%;
    display: none;
}

.text-content-panel.is-active {
    display: block;
}

.text-content {
    color: var(--color-text);
    background-color: var(--color-light-gray);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.text-actions {
    margin: 15px;
    text-align: center;
}

/*-----------------------------------------------------------------*/
/* Wind Radii                                                    */
/*-----------------------------------------------------------------*/
.radii-compass-section {
    color: var(--color-text);
    background-image: url('../../images/isabel.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: var(--section-padding);
    border-radius: var(--radius-md);
}
.radii-compass {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
    padding: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.radii-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.radii-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    color: black;
    font-weight: bold;
    gap: 6px;
    opacity: 0.9;
}

.legend-color {
    width: 100%;
    height: auto;
    padding: 4px;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.radii-storm-icon {
    z-index: 10;
}

.radii-table {
    display: none;
    width: 100%;
}

.subtabs--radii .muted {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
    padding: 10px;
}

/*=================================================================*/
/*                      RESPONSIVE STYLES                          */
/*=================================================================*/

/*-----------------------------------------------------------------*/
/* Desktop First (Large Screens)                                   */
/*-----------------------------------------------------------------*/
@media (min-width: 1200px) {
    /* Layout for side-by-side containers */
    .ww-layout-container {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: var(--layout-gap);
        margin-top: var(--space-5);
        margin-bottom: var(--space-5);
    }
    .ww-layout-container > section {
        margin: 0;
    }
}

@media (max-width: 1200px) {
    .storm-header-section,
    .active-satellite-section,
    .storm-hazards-section,
    .storm-surge-section,
    .storm-text-section,
    .track-messages-section,
    .radii-section,
    .wind-analysis-section,
    .wind-graphics-section,
    .wind-probability-section {
        min-height: unset;
        aspect-ratio: unset;
    }
}

/*-----------------------------------------------------------------*/
/* Tablet & Smaller (Portrait)                                     */
/*-----------------------------------------------------------------*/
@media (max-width: 1024px) {
    .overview-kv {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 900px) {
    /* Adjust map label visibility */
    .site-page--active {
        --map-label-min-priority: 3;
        --map-label-priority-1: 8;
        --map-label-priority-2: 8.3;
        --map-label-priority-3: 8.6;
        --map-label-priority-4: 8.9;
        --map-label-priority-5: 9.2;
        --map-label-priority-6: 9.5;
        --map-label-priority-7: 9.8;
        --map-label-priority-8: 10.1;
        --map-label-priority-9: 10.5;
        --map-label-priority-10: 11;
    }
}

/*-----------------------------------------------------------------*/
/* Mobile (General)                                                */
/*-----------------------------------------------------------------*/
@media (max-width: 768px) {
    /* Adjust map label visibility */
    .site-page--active {
        --map-label-min-priority: 8;
    }

    /* Radii Controls */
    .subtabs--radii-hours,
    .subtabs--radii {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    }

    .radii-compass {
        max-width: 350px;
    }

    /* Text Tabs */
    .tab-desc {
        display: none;
    }
}

/*-----------------------------------------------------------------*/
/* Mobile (Small)                                                  */
/*-----------------------------------------------------------------*/
@media (max-width: 640px) {
    .ov-info-line .ov-label {
        margin-bottom: 0.1rem;
    }

    #overview-v2 .ov-label[data-short] > .ov-label-full {
    display: none;
    }

    #overview-v2 .ov-label[data-short]::before {
        content: attr(data-short);
    }

    .overview-kv {
        grid-template-columns: 1fr;
    }

    .overview-kv dt {
        opacity: 0.8;
    }

    .overview-kv dd {
        padding-bottom: 6px;
        border-bottom: 1px dotted rgba(255, 255, 255, 0.12);
    }
}

@media (max-width: 600px) {
    /* Empty W/W text */
    #ww-wind-text-empty,
    #ww-surge-text-empty {
        font-size: 0.9rem;
    }
}

/*-----------------------------------------------------------------*/
/* Mobile (Extra Small)                                            */
/*-----------------------------------------------------------------*/
@media (max-width: 480px) {
    /* Storm Overview */
    .ov-info-line {
        flex-direction: column;
        align-items: center;
    }
    /* Text Products */
    .text-content {
        font-size: 0.8em;
        padding: 10px;
    }

    /* Radii Controls */
    .radii-compass {
        max-width: 300px;
        padding: 8px;
    }

    .radii-legend,
    .legend-item {
        font-size: 0.75rem;
    }

    .legend-color {
        padding: 2px;
    }
}

@media (max-width: 400px) {
    .radii-compass {
        max-width: 280px;
        padding: 5px;
    }

    .radii-compass-section {
        padding: 10px;
    }
}

@media (max-width: 360px) {
    /* Radii Controls */
    .subtabs--radii-hours,
    .subtabs--radii {
        grid-template-columns: 1fr;
    }

    .radii-compass {
        max-width: 260px;
        padding: 3px;
    }

    .radii-compass-section {
        padding: 8px;
    }

    .radii-legend {
        font-size: 0.8rem;
        gap: 10px;
    }
}

/*=================================================================*/
/* PHASE 5 DARK WEATHER-CENTER SHELL                               */
/*=================================================================*/

.page-header--active {
    margin: 0 0 14px;
    text-align: center;
}

.active-top-layout,
.ww-layout-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 24px);
    align-items: stretch;
}

.storm-header-container,
.active-storm-map-container,
.active-satellite-container,
.radii-container,
.wind-analysis-container,
.hazards-container,
.surge-container,
.graphics-container,
.wind-graphics-container,
.wind-probability-container,
.surge-rain-container,
.text-products-container {
    min-width: 0;
    margin: 0;
    padding: clamp(10px, 1.5vw, 18px) 0;
}

.section-title-active {
    margin: 0;
    color: #f5f9fc;
    font-size: clamp(1rem, 1.8vw, 1.45rem);
    cursor: default;
    letter-spacing: 0.025em;
}

.section-title-active .fontawesome-icon {
    margin-right: 0.5rem;
    color: #fff200;
}

.glass {
    position: relative;
    border: 1px solid rgba(171, 198, 218, 0.42);
    border-radius: 12px;
    background: #071b2e;
    box-shadow: 0 8px 24px rgba(2, 8, 14, 0.3);
    backdrop-filter: none;
}

.glass::after {
    content: none;
}

.storm-header-section,
.active-storm-map-section,
.active-satellite-section,
.storm-hazards-section,
.storm-surge-section,
.storm-text-section,
.radii-section,
.wind-analysis-section,
.track-messages-section,
.wind-graphics-section,
.wind-probability-section,
.surge-rain-section {
    box-sizing: border-box;
    margin-top: 8px;
    padding: clamp(10px, 1.5vw, 18px);
}

.storm-header-section,
.active-storm-map-section {
    min-height: 590px;
}

.active-storm-map-section {
    --weather-map-block-size: 29.375rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-storm-map-section .weather-map {
    overflow: hidden;
    border: 1px solid rgba(171, 198, 218, 0.32);
    border-radius: 9px;
    background: #020817;
}

.active-storm-map-controls label:has(input:focus-visible) {
    outline: 2px solid #fff200;
    outline-offset: 2px;
}

.active-storm-map-controls label.is-unavailable {
    opacity: 0.48;
    cursor: not-allowed;
}

.active-storm-map-controls input {
    accent-color: #fff200;
}

.active-storm-map-section .tropical-map-status {
    min-height: 1.5em;
    margin: 0;
    font-size: 0.78rem;
}

.active-satellite-wide {
    width: 100%;
}

.active-satellite-wide .active-satellite-section {
    min-height: 0;
}

.storm-hazards-section,
.storm-surge-section,
.storm-text-section,
.track-messages-section,
.radii-section,
.wind-analysis-section,
.wind-graphics-section,
.wind-probability-section {
    min-height: clamp(20rem, 38svh, 34rem);
}

.surge-rain-section {
    min-height: clamp(18rem, 34svh, 32rem);
}

@media (max-width: 900px) {
    .active-top-layout,
    .ww-layout-container {
        grid-template-columns: 1fr;
    }

    .storm-header-section,
    .active-storm-map-section {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    .active-storm-map-section {
        --weather-map-block-size: 24.375rem;
    }

    .active-map-layers .active-storm-map-controls label {
        flex: 1 1 calc(33.333% - 6px);
        justify-content: start;
        padding-inline: 6px;
        font-size: 0.65rem;
    }
}

/*=================================================================*/
/* ACTIVE STORM PRODUCT WORKSPACE                                  */
/*=================================================================*/

.active-storm-workspace {
    display: grid;
    gap: clamp(28px, 5vw, 64px);
    margin-top: clamp(24px, 4vw, 46px);
}

.active-module {
    container-type: inline-size;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(164, 190, 211, 0.52);
    border-radius: 12px;
    background: #071b2e;
    box-shadow: 0 10px 26px rgba(3, 9, 15, 0.34);
}

@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) and (max-height: 500px) {
    .active-module--storm {
        overflow: clip;
    }
}

.tabset__tab[hidden],
.active-module__panel[hidden],
.active-satellite-image-container[hidden] {
    display: none !important;
}

.active-module__panel {
    min-width: 0;
    padding: clamp(0.5rem, 0.125rem + 1.5vw, 1.25rem);
    background: #071b2e;
}

.active-summary-layout {
    display: grid;
    min-height: clamp(500px, 56vw, 610px);
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(14px, 2vw, 24px);
}

.active-summary-layout .storm-header-container {
    min-width: 0;
    padding: 0;
}

.active-module .storm-header-section,
.active-module .active-storm-map-section,
.active-module .storm-hazards-section,
.active-module .storm-surge-section,
.active-module .storm-text-section,
.active-module .track-messages-section,
.active-module .radii-section,
.active-module .wind-analysis-section,
.active-module .wind-graphics-section,
.active-module .wind-probability-section,
.active-module .surge-rain-section {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.active-summary-layout .storm-header-section,
.active-summary-layout .storm-header,
.active-summary-layout #overview-v2,
.active-summary-layout .overview-v2 {
    height: 100%;
}

.active-summary-forecast {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(177, 201, 220, 0.26);
    border-radius: 9px;
    background: #061524;
}

.active-summary-forecast-content {
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
}

#active-summary-forecast-image {
    display: block;
    width: 100%;
    max-height: 535px;
    border-radius: 7px;
    object-fit: contain;
}

#active-summary-forecast-image[hidden] {
    display: none;
}

.active-summary-forecast-empty {
    display: grid;
    min-height: 240px;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 24px;
    color: #cbd9e4;
    text-align: center;
}

.active-summary-forecast-empty[hidden] {
    display: none;
}

.active-summary-forecast-empty i {
    color: #7fa3bd;
    font-size: 2.2rem;
}

.active-summary-forecast-empty p {
    max-width: 34rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.active-summary-products-link {
    display: inline-flex;
    min-height: var(--control-target-min, 24px);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(151, 180, 202, 0.58);
    border-radius: 8px;
    background: #173750;
    color: #f5f9fc;
    cursor: pointer;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: 0.76rem;
    font-weight: 650;
}

.active-summary-products-link:hover {
    border-color: rgba(220, 234, 243, 0.82);
    background: #1c405d;
}

.active-summary-products-link:focus-visible {
    outline: 2px solid #fff200;
    outline-offset: 2px;
}

.active-module__panel--map {
    padding: 0;
}

.active-module .active-storm-map-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.map-toolbar--active {
    position: relative;
    display: grid;
    min-height: auto;
    grid-template-columns: repeat(2, minmax(0, max-content));
    align-items: center;
    column-gap: 5px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(177, 201, 220, 0.24);
    background: #0b2238;
}

.active-map-imagery {
    grid-column: 1;
    grid-row: 2;
}

.active-map-layers {
    grid-column: 2;
    grid-row: 2;
}

.active-map-imagery .active-map-imagery-options {
    left: 0;
    width: min(125px, calc(100vw - 36px));
    grid-template-columns: 1fr;
}

.active-map-layers .active-storm-map-controls {
    left: 0;
    width: min(125px, calc(100vw - 36px));
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

html.active-map-sheet-open,
html.active-map-sheet-open body {
    overflow: hidden;
}

.active-map-sheet {
    position: fixed;
    inset: 20svh 0 auto;
    box-sizing: border-box;
    width: min(85%, 36rem);
    max-width: 100%;
    max-height: 70vh;
    max-height: 70dvh;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--component-menu-border-color);
    border-radius: 10px;
    background: var(--component-menu-background);
    color: var(--component-menu-color);
}

.active-map-sheet[open] {
    display: flex;
    flex-direction: column;
    /* Match the Home map-key drawer's opening movement and fade. */
    animation:
        active-map-sheet-slide-in 0.22s ease,
        active-map-sheet-fade-in 0.18s ease;
}

@keyframes active-map-sheet-slide-in {
    from { transform: translateX(calc(100% + 1rem)); }
    to { transform: translateX(0); }
}

@keyframes active-map-sheet-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .active-map-sheet[open] {
        animation: none;
    }
}

.active-map-sheet::backdrop {
    background: rgba(2, 8, 14, 0.62);
}

.active-map-sheet__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--component-menu-border-color);
}

.active-map-sheet__header h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
}

.active-map-sheet__close {
    min-height: 20px;
    padding: 8px;
    border: 1px solid var(--component-menu-border-color);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.active-map-sheet__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.active-map-sheet .map-menu__options {
    position: static;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.active-map-sheet .map-menu__options label {
    min-height: 30px;
    padding: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.active-map-sheet label:has(input:disabled) {
    opacity: 0.5;
    cursor: default;
}

.active-map-sheet :is(button, input):focus-visible {
    outline: 2px solid var(--focus-ring-color, #fff200);
    outline-offset: 2px;
}

.active-module .active-storm-map-section {
    --weather-map-min-block-size: 22rem;
    --weather-map-max-block-size: 36rem;
    --weather-map-stack-offset: 25rem;
    --weather-map-block-size: clamp(
        var(--weather-map-min-block-size),
        calc(100svh - var(--weather-map-stack-offset)),
        var(--weather-map-max-block-size)
    );
}

.active-module .active-storm-map-section .weather-map {
    border: 0;
    border-radius: 0;
}

.active-storm-map-section .active-satellite-image-container {
    display: none;
}

.map-legend--active {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-top: 1px solid rgba(177, 201, 220, 0.18);
    background: #081b2e;
    color: #bfcfdb;
    font-family: var(--font-heading, 'Montserrat', sans serif);
    font-size: 0.74rem;
}

.map-legend--active strong {
    color: #fff;
    font-family: var(--font-heading, "Montserrat", sans-serif);
}

.active-alerts-layout {
    display: block;
}

.subtabs--active-alerts .subtabs__tab[hidden],
[data-alert-panel][hidden] {
    display: none;
}

.active-alerts-layout .hazards-container,
.active-alerts-layout .surge-container {
    min-width: 0;
    padding: 0;
}

.active-alerts-layout .storm-hazards-section,
.active-alerts-layout .storm-surge-section {
    min-height: 0;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(177, 201, 220, 0.24);
    border-radius: 9px;
    background: #061524;
}

.ww-leaflet-map {
    width: 100%;
    height: clamp(380px, 45vw, 580px);
    overflow: hidden;
    border: 1px solid rgba(177, 201, 220, 0.3);
    border-radius: 8px;
    background: #020817;
}

.active-alert-popup {
    display: grid;
    gap: 4px;
    font-family: var(--font-heading, 'Montserrat', sans serif);
}

.active-alert-popup__title {
    font-family: var(--font-heading, "Montserrat", sans-serif);
}

.active-alert-popup__location {
    color: #b9c9d6;
}

.ww-textcol {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.ww-block {
    overflow: hidden;
    border: 1px solid rgba(177, 201, 220, 0.24);
    border-radius: 8px;
    background: #0a1f34;
}

.ww-block-title {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 11px;
    border-left: 4px solid var(--ww-alert-color, #9fb9cc);
    background: color-mix(in srgb, var(--ww-alert-color, #9fb9cc) 24%, #0a1f34);
    color: #fff;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
}

.ww-block ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ww-block li {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 9px 11px;
    border-top: 1px solid rgba(177, 201, 220, 0.16);
    color: #cfdae3;
    font-size: 0.8rem;
    line-height: 1.45;
}

.ww-state-code {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #173750;
    color: #fff;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: 0.7rem;
}

.ww-zone-list {
    min-width: 0;
}

.active-module--nhc .active-module__panel,
.active-module--wind .active-module__panel {
    min-height: clamp(20rem, 38svh, 34rem);
}

.active-module--nhc .storm-text-section,
.active-module--nhc .track-messages-section,
.active-module--wind .radii-section,
.active-module--wind .wind-analysis-section,
.active-module--wind .wind-graphics-section,
.active-module--wind .wind-probability-section {
    min-height: inherit;
}

.active-module--nhc #nhc-panel-advisories,
.active-module--nhc #nhc-panel-advisories .storm-text-section {
    min-height: 0;
}

.active-module .track-language-panel[hidden],
.active-module .graphics-content-panel[hidden] {
    display: none !important;
}

.active-module__heading {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(177, 201, 220, 0.34);
    background: #0a1f34;
}

.active-module__heading i {
    color: #fff200;
}

.active-module__title {
    /* --section-heading-size: clamp(0.9rem, 1.2vw, 1.05rem); */
    margin: 0;
    color: #fff;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-weight: 700;
}

.active-module--surge-rain .active-module__panel {
    min-height: clamp(18rem, 34svh, 32rem);
}

.active-module--surge-rain .surge-rain-section {
    min-height: inherit;
}

@media (max-width: 900px) {
    .active-summary-layout {
        grid-template-columns: 1fr;
    }

    .active-summary-layout {
        min-height: 0;
    }

    .active-summary-forecast-content {
        min-height: 420px;
    }

    .active-map-imagery .active-map-imagery-options {
        width: min(125px, calc(100vw - 16px));
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .active-storm-workspace {
        gap: 24px;
        margin-top: 14px;
    }

    /* The map retains its compact inset when its toolbar reflows. */
    .active-module__panel--map {
        padding: 0 8px 0 8px;
    }

    .active-summary-forecast {
        display: none;
    }

    .map-toolbar--active {
        align-items: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 3px 0 8px 8px;
        gap: 0.3rem 1.125rem;
    }

    .active-map-layers .active-storm-map-controls {
        width: min(350px, calc(100vw - 16px));
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .active-module .active-storm-map-section {
        --weather-map-min-block-size: 20rem;
        --weather-map-max-block-size: 28.75rem;
        --weather-map-stack-offset: 23rem;
    }

    .active-module--nhc .active-module__panel,
    .active-module--wind .active-module__panel,
    .active-module--surge-rain .active-module__panel {
        min-height: 0;
    }

    .text-content-container {
        min-height: 0;
    }

}

/*=================================================================*/
/* SITE TYPOGRAPHY & CONTROL ALIGNMENT                              */
/*=================================================================*/

.page-title--active .page-title__meta {
    margin-left: 0.4rem;
    color: #fff;
    font-size: clamp(0.6rem, 2vw, 1.5rem);
    font-weight: 650;
    font-style: italic;
    letter-spacing: 0.035em;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.98);
}

.section-title-active {
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: clamp(0.95rem, 1.35vw, 1.2rem);
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: none;
}

#overview-v2 {
    height: 100%;
    gap: 0;
    font-family: var(--font-heading, 'Montserrat', sans serif);
}

#overview-v2 .overview-v2 {
    display: flex;
    height: 100%;
    flex-direction: column;
}

#overview-v2 .ov-info-line {
    display: grid;
    grid-template-columns: minmax(9.5rem, 55%) minmax(0, 1fr);
    align-items: baseline;
    gap: 0.35rem 0.8rem;
    padding: 0.05rem 0;
    line-height: 1.35;
}

/* #overview-v2 .ov-info-line .ov-label,
#overview-v2 .ov-info-line .ov-value {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #eef5fb;
    font-family: var(--font-heading, 'Montserrat', sans serif);
    font-size: clamp(0.82rem, 1vw, 0.95rem);
    font-style: normal;
    text-shadow: none;
    text-transform: none;
} */

#overview-v2 .ov-info-line .ov-label {
    color: #bfcfdb;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-weight: 650;
    letter-spacing: -0.01em;
}

#overview-v2 .ov-info-line .ov-value {
    font-weight: 600;
}

#overview-v2 .ov-info-line[data-key='category'] {
    display: block;
    text-align: center;
}

#overview-v2 .ov-info-line[data-key='category'] .ov-value {
    color: #ff7373;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    text-shadow: none;
}

#overview-v2 .ov-info-line[data-key='message-type'] {
    display: block;
    margin: 0 0 0.35rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid rgba(177, 201, 220, 0.32);
    text-align: center;
}

#overview-v2 .ov-info-line[data-key='message-type'] .ov-value {
    margin: 0;
    color: #e3edf5;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-style: normal;
    font-weight: 650;
    text-align: left;
    text-shadow: none;
}

#overview-v2 .message-type-text,
#overview-v2 [data-key='advisory-number'] {
    font-size: clamp(0.82rem, 1vw, 0.95rem);
}

#overview-v2 .ov-center-section {
    margin: 0.8rem 0 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(177, 201, 220, 0.24);
    border-radius: 8px;
    background: #0a1f34;
    color: #dce7ef;
    font-size: clamp(0.82rem, 1vw, 0.95rem);
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    text-shadow: none;
    text-transform: uppercase;
}

#overview-v2 .ov-center-title {
    color: #fff;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-weight: 650;
}

#overview-v2 .ov-nhc-link-block {
    margin-top: auto;
    padding-top: 1rem;
}

.nhc-link-btn {
    display: inline-flex;
    min-height: 38px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid rgba(151, 180, 202, 0.58);
    border-radius: 8px;
    background: #173750;
    color: #f5f9fc;
    font-family: var(--font-heading, "Montserrat", sans-serif);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.nhc-link-btn:hover {
    border-color: rgba(220, 234, 243, 0.82);
    background: #1c405d;
    color: #fff;
}

.nhc-link-btn:focus-visible {
    outline: 2px solid #fff200;
    outline-offset: 2px;
}

#ww-wind-text-empty,
#ww-surge-text-empty {
    font-family: var(--font-heading, 'Montserrat', sans serif);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 600;
}

@media (max-width: 680px) {
    .page-title--active .page-title__meta {
        display: block;
        margin-left: 0;
        margin-top: 0.15rem;
    }

    #overview-v2 .ov-info-line {
        grid-template-columns: fr;
        gap: 0.15rem;
        padding-left: 10px;
    }
}

@media (max-height: 43.75rem) {
    .active-module .active-storm-map-section {
        --weather-map-min-block-size: 12rem;
    }
}
}
