/* =========================================================
   Weather Explorer
   App-specific visual identity
   ========================================================= */


/* ---------------------------------------------------------
   Weather colour system
   --------------------------------------------------------- */

.weather-search-page,
.weather-results-page {
    --explorer-accent: #0284c7;
    --explorer-accent-strong: #0369a1;
    --explorer-accent-dark: #075985;

    --explorer-accent-soft: rgba(2, 132, 199, 0.10);
    --explorer-accent-medium: rgba(2, 132, 199, 0.18);
    --explorer-accent-border: rgba(2, 132, 199, 0.28);
}


.weather-search-page > .page-section {
    padding-top: 2rem;
}

.weather-results-page > .page-section {
    padding-top: 2rem;
}


.weather-search-card {
    width: 100%;
    max-width: none;
}

.weather-search-form {
    width: 100%;
}




/* ---------------------------------------------------------
   Weather comparison form
   --------------------------------------------------------- */

.weather-comparison-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 1.25rem 1.5rem;
}

.weather-comparison-grid .form-field {
    margin: 0;
}

.weather-comparison-grid select,
.weather-comparison-grid input {
    width: 100%;
}

@media (max-width: 700px) {
    .weather-comparison-grid {
        grid-template-columns: 1fr;
    }
}




/* ---------------------------------------------------------
   Page identity
   --------------------------------------------------------- */

.weather-search-page .page-heading .eyebrow,
.weather-results-page .page-heading .eyebrow {
    color: var(--explorer-accent-strong);
}


/* ---------------------------------------------------------
   Search mode switch
   --------------------------------------------------------- */

.weather-mode-link--active {
    color: #ffffff;
    background: var(--explorer-accent);
    border-color: var(--explorer-accent);
}

.weather-mode-link:hover {
    border-color: var(--explorer-accent-border);
    color: var(--explorer-accent-dark);
}

.weather-mode-link--active:hover {
    color: #ffffff;
    background: var(--explorer-accent-strong);
    border-color: var(--explorer-accent-strong);
}


/* ---------------------------------------------------------
   Search card
   --------------------------------------------------------- */

.weather-search-card {
    border-color: var(--explorer-accent-border);
}

/* ---------------------------------------------------------
   Weather search card header
   --------------------------------------------------------- */

.weather-search-card .search-card-header {
    display: block;

    min-height: 0;
    padding: 0;

    overflow: hidden;

    border-bottom: 1px solid #e4e8eb;

    color: #18384d;
    background: #ffffff;
}

.weather-search-card
.search-card-header .eyebrow {
    display: block;

    margin: 0;
    padding: 0.65rem 2.25rem;

    color: #ffffff;
    background: var(--explorer-accent);

    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.weather-search-card
.search-card-header h2 {
    max-width: 760px;

    margin:
        1.5rem
        2.25rem
        0.4rem;

    color: #18384d;

    font-size:
        clamp(1.45rem, 2.5vw, 1.85rem);

    line-height: 1.2;
}

.weather-search-card
.search-card-header p:not(.eyebrow) {
    max-width: 760px;

    margin:
        0
        2.25rem
        1.5rem;

    color: #647886;

    line-height: 1.6;
}

.weather-search-card .search-card-header::before,
.weather-search-card .search-card-header::after {
    content: none;
    display: none;
}





/* ---------------------------------------------------------
   Weather form
   --------------------------------------------------------- */

.weather-search-page .form-field input:focus,
.weather-search-page .form-field select:focus {
    border-color: var(--explorer-accent);

    box-shadow:
        0 0 0 3px var(--explorer-accent-soft);
}

.weather-search-page .search-button {
    border-color: var(--explorer-accent);
    background: var(--explorer-accent);
}

.weather-search-page .search-button:hover {
    border-color: var(--explorer-accent-strong);
    background: var(--explorer-accent-strong);
}


/* ---------------------------------------------------------
   Quick ranges
   --------------------------------------------------------- */

.weather-search-page
.quick-date-range-button:hover {
    color: var(--explorer-accent-dark);
    border-color: var(--explorer-accent-border);
    background: var(--explorer-accent-soft);
}

.weather-search-page
.quick-date-range-button--active {
    color: #ffffff;
    border-color: var(--explorer-accent);
    background: var(--explorer-accent);
}


/* ---------------------------------------------------------
   Informational note
   --------------------------------------------------------- */

.weather-search-page .search-form-note {
    border-color: var(--explorer-accent-border);

    background:
        linear-gradient(
            135deg,
            rgba(240, 249, 255, 0.88),
            rgba(224, 242, 254, 0.72)
        );
}

.weather-search-page .search-form-note > span {
    color: var(--explorer-accent-strong);
}


/* ---------------------------------------------------------
   Results page identity
   --------------------------------------------------------- */

.weather-results-page .results-back-link {
    color: var(--explorer-accent-strong);
}

.weather-results-page .results-back-link:hover {
    color: var(--explorer-accent-dark);
}




.weather-results-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

    margin-bottom: 2.5rem;
    padding: 1.75rem 2rem;

    color: #fff;

    background:
        radial-gradient(
            circle at 84% 15%,
            rgba(255, 255, 255, 0.13) 0,
            rgba(255, 255, 255, 0.13) 14%,
            transparent 14.2%
        ),
        linear-gradient(
            135deg,
            #075985 0%,
            #0369a1 52%,
            #0284c7 100%
        );

    border-radius: 14px;

    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.12);
}

.weather-results-hero-content {
    min-width: 0;
}

.weather-results-hero-eyebrow {
    margin: 0 0 0.65rem;

    color: rgba(255, 255, 255, 0.9);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.weather-results-hero h1 {
    margin: 0;

    color: #fff;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.weather-results-hero-meta {
    margin: 0.65rem 0 0;

    color: #fff;

    font-weight: 600;
}

.weather-results-hero-location {
    margin: 0.3rem 0 0;

    color: rgba(255, 255, 255, 0.8);

    font-size: 0.85rem;
}

.weather-results-report-button {
    flex-shrink: 0;

    color: #fff;
    background: rgba(255, 255, 255, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.45);
}

.weather-results-report-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 700px) {
    .weather-results-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}









/* ---------------------------------------------------------
   Summary section
   --------------------------------------------------------- */

.weather-results-page
.summary-section-heading .eyebrow {
    color: var(--explorer-accent-strong);
}


/*
 * Preserve the semantic colours of the individual weather
 * measurements while giving neutral/statistical cards the
 * Weather Explorer identity.
 */

.weather-results-page
.summary-icon-statistic {
    color: var(--explorer-accent-strong);

    border-color: var(--explorer-accent-border);

    background: var(--explorer-accent-soft);
}


/* ---------------------------------------------------------
   Chart sections
   --------------------------------------------------------- */

.weather-results-page
.weather-chart-section .eyebrow {
    color: var(--explorer-accent-strong);
}

.weather-results-page
.weather-chart-card {
    border-color: rgba(2, 132, 199, 0.18);
}

.weather-results-page
.weather-chart-card:hover {
    border-color: var(--explorer-accent-border);
}


/* ---------------------------------------------------------
   Detailed records
   --------------------------------------------------------- */

.weather-results-page
.weather-results .eyebrow {
    color: var(--explorer-accent-strong);
}

.weather-results-page
.results-count strong {
    color: var(--explorer-accent-strong);
}


/* ---------------------------------------------------------
   Weather results table
   --------------------------------------------------------- */

.weather-results-page
.weather-results-table thead {
    background:
        rgba(224, 242, 254, 0.58);
}

.weather-results-page
.weather-results-table tbody tr:hover {
    background:
        rgba(240, 249, 255, 0.72);
}


/* ---------------------------------------------------------
   Accessibility
   --------------------------------------------------------- */

.weather-search-page a:focus-visible,
.weather-search-page button:focus-visible,
.weather-results-page a:focus-visible,
.weather-results-page button:focus-visible {
    outline: 3px solid var(--explorer-accent-medium);
    outline-offset: 3px;
}


/* ---------------------------------------------------------
   Weather hero
   --------------------------------------------------------- */

.weather-hero {
    position: relative;
    overflow: hidden;

    margin-bottom: 1.35rem;

    border-radius: 16px;

    background:
        linear-gradient(
            90deg,
            rgba(7, 89, 133, 0.10) 0%,
            rgba(3, 105, 161, 0.05) 52%,
            rgba(2, 132, 199, 0) 68%
        ),
        url("../images/weather-hero-1800x600.34a7a8b3239b.webp")
        center / cover no-repeat;

    color: #ffffff;

    box-shadow:
        0 18px 36px rgba(7, 89, 133, 0.16);
}


.weather-hero-content {
    min-height: 250px;
    padding: 2rem 2.25rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.weather-hero-copy {
    position: relative;
    z-index: 1;

    width: 58%;
    max-width: 670px;
}
.weather-hero-eyebrow {
    margin: 0 0 0.65rem;

    color: #bae6fd;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.weather-hero h1 {
    margin: 0;

    color: #ffffff;

    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.02;
}

.weather-hero-introduction {
    max-width: 620px;
    margin: 0.9rem 0 0;

    color: rgba(255, 255, 255, 0.92);

    font-size: 0.96rem;
    line-height: 1.65;
}




.weather-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.15rem;

    margin-top: 1.35rem;
}

.weather-hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    padding: 0;

    border: 0;
    border-radius: 0;

    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    box-shadow: none;

    font-size: 0.82rem;
    font-weight: 600;
}

.weather-hero-badges i {
    color: #bae6fd;
}

.weather-hero-badges span:not(:last-child)::after {
    content: "•";
    margin-left: 1.15rem;
    color: rgba(255, 255, 255, 0.32);
}



@media (max-width: 700px) {

    .weather-hero {
        background-position: center;
    }

    .weather-hero-content {
        min-height: auto;
        padding: 1.6rem;
    }

    .weather-hero-copy {
        width: 100%;
        max-width: none;
    }

    .weather-hero h1 {
        font-size: 2.15rem;
    }
}


.weather-mode-heading {
    margin: 0 0 0.65rem;
}

.weather-mode-heading .eyebrow {
    margin-bottom: 0.2rem;
    color: var(--explorer-accent-strong);
}

.weather-mode-heading > p:last-child {
    margin: 0;
    color: #5b7180;
    font-size: 0.85rem;
}


.weather-search-page,
.weather-results-page {
    background: #ffffff !important;
}

.weather-search-page::before,
.weather-results-page::before {
    display: none !important;
}


@media (max-width: 700px) {

    .weather-search-card
    .search-card-header .eyebrow {
        padding-inline: 1.5rem;
    }

    .weather-search-card
    .search-card-header h2 {
        margin-inline: 1.5rem;
    }

    .weather-search-card
    .search-card-header p:not(.eyebrow) {
        margin-inline: 1.5rem;
    }
}

/* =========================================================
   Weather results — semantic chart identities
   ========================================================= */

.weather-results-page
.weather-chart-section
.chart-section-heading {
    position: relative;

    padding-left: 1rem;
    margin-bottom: 0.9rem;

    border-left: 4px solid var(--explorer-accent);
}


/* Temperature — amber + blue */

.weather-results-page
.weather-chart-section--temperature
.chart-section-heading {
    border-left-color: #d97706;
}

.weather-results-page
.weather-chart-section--temperature
.eyebrow {
    color: #b45309;
}


/* Rainfall — teal */

.weather-results-page
.weather-chart-section--rainfall
.chart-section-heading {
    border-left-color: #0f766e;
}

.weather-results-page
.weather-chart-section--rainfall
.eyebrow {
    color: #0f766e;
}


/* Snowfall — blue */

.weather-results-page
.weather-chart-section--snowfall
.chart-section-heading {
    border-left-color: #2563eb;
}

.weather-results-page
.weather-chart-section--snowfall
.eyebrow {
    color: #2563eb;
}


/* ---------------------------------------------------------
   Detailed records
   --------------------------------------------------------- */

.weather-results-page
.weather-results--records
.results-heading-row {
    position: relative;

    padding-left: 1rem;
    margin-bottom: 1rem;

    border-left: 4px solid #0369a1;
}


.weather-results-page
.weather-results--records
.results-heading-row .eyebrow {
    color: #0369a1;
}


/* ---------------------------------------------------------
   Long weather table usability
   --------------------------------------------------------- */

.weather-results-page
.results-table-card
.table-scroll {
    position: relative;
}


.weather-results-page
.weather-results-table thead th {
    position: sticky;
    top: 0;

    z-index: 2;

    background: #0b2d42;
    color: #ffffff;

    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08);
}


@media (max-width: 700px) {

    .weather-results-page
    .weather-results-table th:first-child,
    .weather-results-page
    .weather-results-table td:first-child {
        position: sticky;
        left: 0;

        z-index: 1;

        background: #ffffff;
    }

    .weather-results-page
    .weather-results-table thead th:first-child {
        z-index: 3;

        background: #0b2d42;
    }

}




/* =========================================================
   Weather results table — stronger visual treatment
   ========================================================= */

.weather-results-page
.results-table-card {
    overflow: hidden;

    border: 1px solid #d7e3ea;
    border-radius: 0.8rem;

    background: #ffffff;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.05);
}


/* Table header */

.weather-results-page
.weather-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    padding-top: 0.9rem;
    padding-bottom: 0.9rem;

    color: #ffffff;
    background: #0b2f44;

    border-bottom: 0;

    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}


/* Unit text in header */

.weather-results-page
.weather-results-table thead th span {
    color: rgba(255, 255, 255, 0.68);
}


/* Rows */

.weather-results-page
.weather-results-table tbody th,
.weather-results-page
.weather-results-table tbody td {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;

    border-bottom: 1px solid #edf1f3;
}


/* Date column */

.weather-results-page
.weather-results-table tbody th {
    color: #0b2f44;

    font-weight: 650;
}


/* High temperature */

.weather-results-page
.weather-results-table tbody td:nth-child(2) {
    color: #b45309;

    font-weight: 600;
}


/* Low temperature */

.weather-results-page
.weather-results-table tbody td:nth-child(3) {
    color: #2563eb;

    font-weight: 600;
}


/* Rainfall */

.weather-results-page
.weather-results-table tbody td:nth-child(4) {
    color: #0f766e;
}


/* Snowfall */

.weather-results-page
.weather-results-table tbody td:nth-child(5) {
    color: #2563eb;
}


/* Wind */

.weather-results-page
.weather-results-table tbody td:nth-child(6) {
    color: #6d28d9;
}


/* Hover */

.weather-results-page
.weather-results-table tbody tr:hover {
    background: #f8fafc;
}


/* =========================================================
   Weather comparison results
   ========================================================= */

.weather-comparison-hero {
    margin-bottom: 2.25rem;
}