/* v 260510.0314 UTC */

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #667085;
    --accent: #0b6efd;
    --accent-dark: #10224a;
    --border: #d0d7de;
    --success: #198754;
    --ev-accent: #128c52;
    --ev-accent-dark: #0b3d2a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.site-header {
    position: relative;
    padding: 26px 20px;
    text-align: center;
    background: var(--accent-dark);
    color: white;
    min-height: 178px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-stage {
    width: min(950px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns:
        clamp(120px, 20vw, 190px)
        minmax(280px, 1fr)
        clamp(120px, 20vw, 190px);
    align-items: center;
}

.site-header.rff-theme {
    background: linear-gradient(180deg, #d8001d 0%, #c4001a 100%);
}


.app-switch-card {
    grid-column: 3;
    justify-self: center;

    position: static;
    transform: none;

    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);

    padding:
        clamp(7px, 1vw, 10px)
        clamp(9px, 1.4vw, 14px);

    border-radius: clamp(10px, 1.4vw, 14px);

    color: white;
    text-decoration: none;

    box-shadow: 0 4px 14px rgba(0,0,0,0.25);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.app-switch-card:hover,
.app-switch-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.32);
    filter: brightness(1.06);
}

.app-switch-card-rff {
    background: linear-gradient(135deg, #68101d 0%, #b51f35 100%);
}

.app-switch-card-ppf {
    background: linear-gradient(135deg, #071a35 0%, #14528c 100%);
}

.app-switch-icon {
    width: clamp(24px, 3.5vw, 42px);
    height: clamp(24px, 3.5vw, 42px);
    object-fit: contain;
    flex: 0 0 auto;
}

.app-switch-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.app-switch-code {
    display: block;
    font-size: clamp(0.95rem, 1.8vw, 1.25rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
}

.app-switch-title {
    display: block;
    margin-top: 2px;
    font-size: clamp(0.55rem, 1vw, 0.72rem);
    font-weight: 600;
    line-height: 1.1;
    opacity: 0.92;
    white-space: nowrap;
}

.status.status-error {
    color: #6f1d1d;
    background: #fff0f0;
    border-color: #e28a8a;
    font-weight: 700;
}

.brand-lockup {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: clamp(120px, 20vw, 190px) 1fr;
    align-items: center;
}

.brand-icon {
    grid-column: 1;
    justify-self: center;
    width: clamp(90px, 13vw, 128px);
    height: auto;
    display: block;
}

.brand-stack {
    grid-column: 2;
    justify-self: center;
    width: clamp(320px, 52vw, 520px);
    color: white;
    margin-left: 0;
    text-align: center;
}

.brand-stack h1 {
    margin: 0;
    font-size: clamp(3.4rem, 8vw, 5.8rem);
    line-height: 0.9;
    letter-spacing: 0.03em;
    font-weight: 800;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: clamp(0.76rem, 1.35vw, 1.05rem);
    letter-spacing: clamp(0.18em, 0.6vw, 0.42em);
    text-transform: uppercase;
    white-space: nowrap;
}

.tagline {
    margin-top: 22px;
    font-size: 1rem;
    opacity: 0.85;
    text-align: center;
}

.app {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.controls,
.status,
.results-wrap,
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: end;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: bold;
}

select,
button,
input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
}

button {
    cursor: pointer;
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

button.rff-button {
    background: #c4001a;
    border-color: #c4001a;
}

.status { color: var(--muted); }

.directions {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--success);
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.hidden { display: none !important; }

.site-footer {
    margin-top: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 0.9rem;
    color: #777;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.footer-link { color: inherit; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

.footer-version {
    position: absolute;
    left: 8px;
    bottom: 4px;
    opacity: 0;
    font-size: 0.7rem;
    transition: opacity 0.2s ease;
}

.site-footer:hover .footer-version { opacity: 0.5; }
.footer-warning-medium { color: #d9a441; }
.footer-warning-high { color: #d96b41; font-weight: 600; }

@media (max-width: 850px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .site-header {
        display: block;
        min-height: 0;
        padding: 20px 14px;
        text-align: center;
    }
    .brand-lockup {
        flex-direction: column;
        justify-content: center;
        gap: 14px;
    }
    .brand-stack { width: 100%; text-align: center; margin-left: 0; }
    .brand-stack h1 { font-size: 3.5rem; }
    .brand-subtitle { white-space: normal; }
    .tagline { text-align: center; }
    .brand-icon { width: 104px; }
    .app-switch-card {
        position: static;
        justify-content: center;
        width: min(230px, 100%);
        margin: 18px auto 0;
    }
}

@media (max-width: 530px) {

    .header-stage {
        position: relative;
        padding-top: 0;
    }

    .app-switch-card {
        position: absolute;
        top: 25px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin: 0;

        width: max-content;
        min-width: max-content;
        flex-shrink: 0;
    }

    .app-switch-card:hover,
    .app-switch-card:focus-visible {
        transform: translateX(-50%) translateY(-2px);
    }

    .app-switch-text {
        flex-shrink: 0;
    }

    .app-switch-title {
        white-space: nowrap;
    }
}

.site-header.ecf-theme {
    background: linear-gradient(180deg, #128c52 0%, #0b3d2a 100%);
}

.app-switch-card-ecf {
    background: linear-gradient(135deg, #0b3d2a 0%, #128c52 100%);
}

.inline-disclaimer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 0.82rem;
    line-height: 1.45;
    color: #666;
}

.inline-disclaimer strong {
    color: #444;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}


/* SVG header artwork model v 260509.0341 UTC */
.site-header-art {
    padding: 0;
    text-align: center;
    background: var(--accent-dark);
    color: white;
}

.site-header-art.rff-theme {
    background: linear-gradient(180deg, #d8001d 0%, #8e0013 100%);
}

.site-header-art.ecf-theme {
    background: linear-gradient(180deg, #128c52 0%, #0b3d2a 100%);
}

.header-art-wrap {
    position: relative;
    width: min(950px, 100%);
    margin: 0 auto;
}

.header-art {
    display: block;
    width: 100%;
    height: auto;
}

.header-switch-hotspot {
    position: absolute;
    left: 79.35%;
    top: 33.3%;
    width: 17.5%;
    height: 33.4%;
    display: block;
    border-radius: 16px;
    text-indent: -9999px;
    overflow: hidden;
}

.header-switch-hotspot:focus-visible {
    outline: 3px solid rgba(255,255,255,0.9);
    outline-offset: 3px;
}




@media (max-width: 530px) {
    .header-art-wrap {
        width: min(530px, 100%);
        min-width: 0;
        transform: none;
    }

    .header-switch-hotspot {
        left: 34.35%;
        top: 84.4%;
        width: 31.3%;
        height: 12.2%;
    }

    .site-header-art {
        overflow-x: hidden;
    }
}

td[data-label="Updated"] {
    font-size: 0.85rem;
    white-space: nowrap;
}

/* v 260509.1954 UTC */

.reported-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.reported-fresh {
    color: #198754;
}

.reported-aging {
    color: #d9a441;
}

.reported-stale {
    color: #d96b41;
}

.reported-heading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reported-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d0d7de;
    color: #333;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: help;
}

.reported-info:hover {
    background: #b8c2cc;
}

/* v 260510.0314 UTC */
.expand-col {
    width: 42px;
}

.expand-cell {
    width: 42px;
    text-align: center;
}

.expand-btn {
    border: none;
    background: transparent;
    color: #555;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 2px 6px;
}

.expand-btn.expanded {
    transform: rotate(90deg);
}

.station-row-expanded {
    background: rgba(11, 110, 253, 0.03);
}

.station-detail-row td {
    background: #f8fafc;
    padding: 16px;
    border-top: none;
}

.station-detail-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.station-detail-label {
    font-weight: 700;
    color: #555;
}

.station-detail-note {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.45;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.reported-fresh {
    color: #198754;
}

.reported-aging {
    color: #d9a441;
}

.reported-stale {
    color: #d96b41;
}


/* Station detail layout v 260509.2349 UTC */
.station-detail-grid {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    justify-content: start;
    gap: 42px;
}

.station-detail-section h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #333;
}

.station-hours-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 5px 14px;
    line-height: 1.35;
}

.station-hours-day {
    font-weight: 700;
    color: #555;
}

.station-hours-time {
    color: #1f2933;
}

.station-fuel-list {
    width: min(360px, 100%);
}

.station-fuel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    column-gap: 16px;
    align-items: baseline;
    margin-bottom: 8px;
}

.station-fuel-name {
    font-weight: 600;
    min-width: 0;
}

.station-fuel-price {
    display: block;
    width: 72px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.station-phone-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.station-phone-link:hover {
    text-decoration: underline;
}

.station-detail-muted {
    color: #777;
    font-style: italic;
}

@media (max-width: 850px) {
    .station-detail-grid {
        grid-template-columns: 1fr;
    }

    .station-hours-grid {
        grid-template-columns: minmax(92px, max-content) 1fr;
    }
}


/* PPF mobile accordion refinement v 260510.0314 UTC */
@media (max-width: 850px) {
    tbody tr.station-row {
        position: relative;
        padding: 12px 14px;
        margin-bottom: 0;
        border-radius: 14px;
    }

    tbody tr.station-row-expanded {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
        background: var(--card);
    }

    tbody tr.station-row td.expand-cell {
        position: absolute;
        top: 14px;
        right: 14px;
        display: block;
        width: auto;
        padding: 0;
        border: none;
        z-index: 2;
    }

    tbody tr.station-row td.expand-cell::before {
        display: none;
        content: "";
    }

    .expand-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: #f8fafc;
        color: #1f2933;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .expand-btn.expanded {
        transform: rotate(90deg);
    }

    tbody tr.station-row td.price {
        font-size: 1.8rem;
        line-height: 1.1;
        padding-right: 52px;
        margin-bottom: 8px;
    }

    tbody tr.station-detail-row {
        background: var(--card);
        border: 1px solid var(--border);
        border-top: none;
        border-radius: 0 0 14px 14px;
        margin-top: 0;
        margin-bottom: 12px;
        padding: 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    }

    tbody tr.station-detail-row td {
        display: block;
        padding: 0;
        border: none;
    }

    tbody tr.station-detail-row td::before {
        display: none;
        content: "";
    }

    .station-detail-row td {
        background: transparent;
    }

    .station-detail-panel {
        padding: 12px 14px 14px;
        gap: 12px;
        font-size: 0.95rem;
    }

    .station-detail-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        justify-content: stretch;
    }

    .station-detail-section {
        text-align: left;
    }

    .station-detail-section h4 {
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .station-detail-section-hours {
        order: 1;
    }

    .station-detail-section-contact {
        order: 2;
    }

    .station-detail-section-fuels {
        order: 3;
    }

    .station-hours-grid {
        grid-template-columns: minmax(92px, max-content) 1fr;
        gap: 5px 12px;
    }

    .station-fuel-row {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 18px;
        max-width: 360px;
    }

    .station-fuel-price {
        text-align: right;
    }

    .station-detail-note {
        margin-top: 2px;
        padding-top: 10px;
    }
}

.station-fuel-list {
    width: min(360px, 100%);
}

.station-fuel-row {
    display: grid;
    grid-template-columns: 1fr 72px;
    column-gap: 16px;
    align-items: baseline;
    margin-bottom: 8px;
}

.station-fuel-name {
    font-weight: 600;
    min-width: 0;
}

.station-fuel-price {
    display: block;
    width: 72px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
/* Mobile expand button visibility refinement v 260510.0538 UTC */
@media (max-width: 720px) {
    .expand-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 50%;
        font-size: 1.15rem;
        font-weight: 800;
    }
}

/* PPF map marker highlight colours v 260510.0918 UTC */

.ppf-map-marker-best {
    background: #198754 !important;
    border-color: #146c43 !important;
}

.ppf-map-marker-high {
    background: #b51f35 !important;
    border-color: #8e0013 !important;
}

.ppf-map-marker-best .ppf-map-marker-label {
    background: #146c43;
    color: #ffffff;
}

.ppf-map-marker-high .ppf-map-marker-label {
    background: #8e0013;
    color: #ffffff;
}

.ppf-map-marker-best .ppf-map-marker-price,
.ppf-map-marker-high .ppf-map-marker-price {
    color: #ffffff;
}

/* Force PPF map marker highlight colours */

.ppf-map-marker.ppf-map-marker-best {
    background: #198754 !important;
    border-color: #146c43 !important;
}

.ppf-map-marker.ppf-map-marker-high {
    background: #b51f35 !important;
    border-color: #8e0013 !important;
}

.ppf-map-marker.ppf-map-marker-best .ppf-map-marker-price,
.ppf-map-marker.ppf-map-marker-high .ppf-map-marker-price {
    color: #ffffff !important;
}

.ppf-map-marker.ppf-map-marker-best .ppf-map-marker-label {
    background: #146c43 !important;
    color: #ffffff !important;
}

.ppf-map-marker.ppf-map-marker-high .ppf-map-marker-label {
    background: #8e0013 !important;
    color: #ffffff !important;
}
/* v 260517.0248 UTC - soften Leaflet scale control */
.leaflet-control-scale {
    opacity: 0.82;
}

.leaflet-control-scale-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.52), rgba(255,255,255,0.34)) !important;
    border-color: rgba(0,0,0,0.45) !important;
    color: #222 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    backdrop-filter: blur(2px);
}
