/* ---------------------------------------------------------
   Lighthouse Radio: location-aware Environment Canada weather
--------------------------------------------------------- */

.lighthouse-weather-section {
    position: relative;
    overflow: hidden;
    padding-top: clamp(44px, 7vw, 84px);
    padding-bottom: clamp(44px, 7vw, 84px);
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(242, 182, 50, 0.16),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            var(--navy-900, #061a33),
            #0a2a4f 54%,
            #10395f
        );
}

.lighthouse-weather-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.24;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    mask-image:
        linear-gradient(
            to bottom,
            transparent,
            #000 22%,
            #000 78%,
            transparent
        );
}

.weather-widget-shell {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-large, 28px);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.07)
        );
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(14px);
}

.weather-widget-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    padding: clamp(24px, 4vw, 40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.weather-widget-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--gold-500, #f2b632);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.weather-widget-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.weather-widget-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.02;
}

.weather-widget-intro {
    max-width: 690px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.65;
}

.weather-location-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.weather-location-button,
.weather-location-select {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
}

.weather-location-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    background: var(--red-600, #d52b38);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(213, 43, 56, 0.28);
}

.weather-location-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.weather-location-button:disabled {
    opacity: 0.62;
    cursor: wait;
    transform: none;
}

.weather-location-select {
    max-width: min(100%, 270px);
    padding: 0 42px 0 16px;
    background: rgba(2, 13, 28, 0.7);
    color: #ffffff;
    cursor: pointer;
}

.weather-location-select option {
    background: #071a32;
    color: #ffffff;
}

.weather-widget-status {
    margin: 0;
    padding: 13px clamp(24px, 4vw, 40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 11, 24, 0.28);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
}

.weather-widget-status[hidden] {
    display: none;
}

.weather-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: clamp(22px, 3vw, 32px) clamp(24px, 4vw, 40px) 0;
    padding: 15px 17px;
    border: 1px solid rgba(255, 220, 100, 0.55);
    border-radius: 16px;
    background: rgba(242, 182, 50, 0.16);
    color: #ffffff;
}

.weather-alert[hidden] {
    display: none;
}

.weather-alert[data-level="red"] {
    border-color: rgba(255, 104, 104, 0.72);
    background: rgba(188, 28, 44, 0.25);
}

.weather-alert[data-level="orange"] {
    border-color: rgba(255, 165, 60, 0.72);
    background: rgba(212, 111, 18, 0.22);
}

.weather-alert-icon {
    font-size: 1.45rem;
}

.weather-alert strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
}

.weather-alert p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.weather-alert a {
    white-space: nowrap;
    color: #ffffff;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.weather-widget-body {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.6fr);
    gap: clamp(24px, 4vw, 44px);
    padding: clamp(26px, 4vw, 42px);
}

.weather-current {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.weather-location-name {
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

.weather-current-primary {
    display: flex;
    align-items: center;
    gap: 18px;
}

.weather-current-icon {
    display: grid;
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.09);
    font-size: 3.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.weather-current-temperature {
    display: block;
    color: #ffffff;
    font-size: clamp(3.3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.92;
}

.weather-current-condition {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 850;
}

.weather-current-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.weather-current-detail {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    background: rgba(2, 11, 24, 0.2);
}

.weather-current-detail span {
    display: block;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.weather-current-detail strong {
    color: #ffffff;
    font-size: 0.98rem;
}

.weather-forecast-panel {
    min-width: 0;
}

.weather-forecast-title {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.weather-forecast-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.weather-forecast-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
}

.weather-forecast-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 0.98rem;
}

.weather-forecast-icon {
    display: block;
    margin: 14px 0 10px;
    font-size: 2rem;
}

.weather-forecast-temp {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-500, #f2b632);
    font-size: 1.35rem;
    font-weight: 900;
}

.weather-forecast-summary {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.86rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.weather-widget-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px clamp(24px, 4vw, 40px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(2, 11, 24, 0.25);
    color: rgba(255, 255, 255, 0.63);
    font-size: 0.79rem;
}

.weather-widget-footer a {
    color: #ffffff;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.weather-widget-loading .weather-widget-body {
    opacity: 0.52;
}

.weather-widget-error {
    padding: clamp(30px, 5vw, 52px);
    text-align: center;
}

.weather-widget-error strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 1.2rem;
}

.weather-widget-error p {
    margin: 0 auto;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 980px) {
    .weather-widget-header,
    .weather-widget-body {
        grid-template-columns: 1fr;
    }

    .weather-location-tools {
        justify-content: flex-start;
    }
}

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

    .weather-forecast-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 13px;
    }

    .weather-forecast-card h3 {
        grid-column: 2;
    }

    .weather-forecast-icon {
        grid-row: 1 / span 2;
        margin: 0;
    }

    .weather-forecast-temp {
        grid-column: 3;
        grid-row: 1 / span 2;
        margin: 0;
    }

    .weather-forecast-summary {
        grid-column: 2;
        -webkit-line-clamp: 2;
    }

    .weather-alert {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .weather-alert a {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .weather-location-tools,
    .weather-location-button,
    .weather-location-select {
        width: 100%;
        max-width: none;
    }

    .weather-current-primary {
        align-items: flex-end;
    }

    .weather-current-icon {
        width: 70px;
        height: 70px;
        border-radius: 20px;
        font-size: 2.55rem;
    }

    .weather-current-details {
        grid-template-columns: 1fr;
    }

    .weather-widget-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ---------------------------------------------------------
   Lighthouse Radio weather widget: light theme
--------------------------------------------------------- */

html:not([data-theme="dark"]) .lighthouse-weather-section {
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(242, 182, 50, 0.2),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #eef6ff,
            #f8fbff 54%,
            #e4f0fb
        );
}

html:not([data-theme="dark"]) .lighthouse-weather-section::before {
    opacity: 0.45;
    background-image:
        linear-gradient(
            rgba(8, 42, 79, 0.06) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(8, 42, 79, 0.06) 1px,
            transparent 1px
        );
}

html:not([data-theme="dark"]) .weather-widget-shell {
    border-color: rgba(8, 42, 79, 0.16);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.96),
            rgba(241, 247, 253, 0.92)
        );
    box-shadow:
        0 24px 60px rgba(8, 42, 79, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: #102a43;
}

html:not([data-theme="dark"]) .weather-widget-header {
    border-bottom-color: rgba(8, 42, 79, 0.12);
}

html:not([data-theme="dark"]) .weather-widget-header h2,
html:not([data-theme="dark"]) .weather-current-temperature,
html:not([data-theme="dark"]) .weather-current-condition,
html:not([data-theme="dark"]) .weather-current-detail strong,
html:not([data-theme="dark"]) .weather-forecast-card h3,
html:not([data-theme="dark"]) .weather-widget-error strong {
    color: #082a4f;
}

html:not([data-theme="dark"]) .weather-widget-intro,
html:not([data-theme="dark"]) .weather-location-name,
html:not([data-theme="dark"]) .weather-forecast-title,
html:not([data-theme="dark"]) .weather-forecast-summary,
html:not([data-theme="dark"]) .weather-widget-error p {
    color: #486581;
}

html:not([data-theme="dark"]) .weather-location-button,
html:not([data-theme="dark"]) .weather-location-select {
    border-color: rgba(8, 42, 79, 0.2);
}

html:not([data-theme="dark"]) .weather-location-select {
    background: #ffffff;
    color: #102a43;
}

html:not([data-theme="dark"]) .weather-location-select option {
    background: #ffffff;
    color: #102a43;
}

html:not([data-theme="dark"]) .weather-widget-status {
    border-bottom-color: rgba(8, 42, 79, 0.1);
    background: rgba(219, 234, 249, 0.55);
    color: #486581;
}

html:not([data-theme="dark"]) .weather-alert {
    border-color: rgba(180, 125, 0, 0.35);
    background: rgba(242, 182, 50, 0.14);
    color: #102a43;
}

html:not([data-theme="dark"]) .weather-alert strong,
html:not([data-theme="dark"]) .weather-alert a {
    color: #082a4f;
}

html:not([data-theme="dark"]) .weather-alert p {
    color: #486581;
}

html:not([data-theme="dark"]) .weather-current-icon {
    border-color: rgba(8, 42, 79, 0.13);
    background: rgba(219, 234, 249, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html:not([data-theme="dark"]) .weather-current-detail {
    border-color: rgba(8, 42, 79, 0.11);
    background: rgba(219, 234, 249, 0.48);
}

html:not([data-theme="dark"]) .weather-current-detail span {
    color: #627d98;
}

html:not([data-theme="dark"]) .weather-forecast-card {
    border-color: rgba(8, 42, 79, 0.12);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(8, 42, 79, 0.07);
}

html:not([data-theme="dark"]) .weather-widget-footer {
    border-top-color: rgba(8, 42, 79, 0.11);
    background: rgba(219, 234, 249, 0.48);
    color: #627d98;
}

html:not([data-theme="dark"]) .weather-widget-footer a {
    color: #0a4f88;
}

