/**
 * GBWebcams — Town Banner (Step 83, v2.53.0)
 *
 * The Town Hero's drawing as the background of a title block (inc/town-banner.php).
 * Loaded after gbwebcams-town-hero.css on every page but the homepage.
 *
 *   .gb-town-banner        the box: position/overflow/radius, a min-height per variant
 *   .gb-town-banner-scene  the hero's scene (data-gb-town-hero, mounted by gbwebcams-town-hero.js), absolute, static
 *   .gb-town-banner-shade  a dark shade over the top-left so the words read; clear over the street
 *   .gb-town-banner-copy   the title, place, address (location) or title + intro (page head)
 *
 * The drawing is 1600×600 units; the scene box is that size × --ts (set by the JS from the
 * banner's width: .42 on phones and in the desktop left column, up to .8 on a wide screen), so
 * the SVG viewBox maps 1:1 and the loop copies carry the street across the rest of the width.
 * Variants: -col (the location title block: full width on phones, the left column on desktop)
 * and -wide (page heads: full width everywhere).
 */

.gb-town-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--gb-radius);
    border: 1px solid var(--gb-border);
    min-height: 200px;
    container-type: normal;
    z-index: 5; /* the location's About popover paints over the host card below (was on .gb-loc-title) */
}
.gb-town-banner-scene.gb-town-hero {
    position: absolute;
    inset: 0;
    min-height: 0;
    display: block;
    background: none;
    pointer-events: none;
    z-index: 0;
    --ts: .42;
}
.gb-town-banner-scene .hc-bg { position: absolute; inset: 0; }
.gb-town-banner-scene .hc-town { left: 0; right: auto; width: calc(1600px * var(--ts)); height: calc(600px * var(--ts)); }
.gb-town-banner-scene .hc-haze-layer,
.gb-town-banner-scene .hc-clouds,
.gb-town-banner-scene .hc-gull,
.gb-town-banner-scene .hc-sunmoon,
.gb-town-banner-scene .hc-stars,
.gb-town-banner-scene .hc-vignette { display: none; } /* a banner is a window onto the street, not a sky */
.gb-town-banner-scene .hc-label { transform: scale(1.5); transform-box: fill-box; transform-origin: 50% 100%; }
.gb-town-banner-scene .hc-ground-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #1a1d26; }

.gb-town-banner-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(var(--gb-bg-dark-rgb), .78) 0%, rgba(var(--gb-bg-dark-rgb), .45) 42%, rgba(var(--gb-bg-dark-rgb), 0) 78%),
        linear-gradient(90deg, rgba(var(--gb-bg-dark-rgb), .55) 0%, rgba(var(--gb-bg-dark-rgb), 0) 70%);
}

.gb-town-banner-copy {
    position: relative;
    z-index: 2;
    padding: 14px 16px 16px;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65), 0 0 18px rgba(0, 0, 0, .35);
}

/* ---- the location title block on the banner ---- */
.gb-town-banner .gb-loc-heading { margin-bottom: 8px; color: #fff; }
.gb-town-banner .gb-loc-heading-main { font-size: clamp(1.7rem, 7.5vw, 2.7rem); }
.gb-town-banner .gb-loc-heading-sub { font-size: clamp(1rem, 4.4vw, 1.5rem); }
.gb-town-banner .gb-loc-pin,
.gb-town-banner .gb-loc-place-name { color: #fff; }
.gb-town-banner a.gb-loc-place-name:hover { color: var(--gb-accent-blue); }
.gb-town-banner .gb-loc-address { color: #e2e8f2; }
.gb-town-banner .gb-loc-about-pop { text-shadow: none; }

/* ---- a page head on the banner ---- */
.gb-town-banner .gb-page-title { color: #fff; margin: 0 0 8px; }
.gb-town-banner .gb-page-intro { color: #e2e8f2; }
.gb-town-banner.gb-page-head { margin-bottom: 26px; }
.gb-town-banner .gb-event-head-when { display: flex; align-items: center; gap: 6px; }

/* ---- phone: the location banner spans the layout; the weather tile rides in its corner ---- */
.gb-town-banner .gb-loc-weather-banner {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 132px;
    padding: 8px 10px;
    gap: 4px;
    background: rgba(var(--gb-bg-dark-rgb), .72);
    border-color: rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    text-shadow: none;
}
.gb-town-banner .gb-loc-weather-banner .gb-weather-row { flex-direction: column; align-items: flex-start; gap: 2px; }
.gb-town-banner .gb-loc-weather-banner .gb-weather-time { align-items: flex-start; text-align: left; border-left: 0; padding-left: 0; }
.gb-town-banner .gb-loc-weather-banner .gb-weather-link { font-size: .62rem; display: none; }
.gb-town-banner .gb-loc-weather-banner .gb-weather-date { display: none; }
.gb-town-banner .gb-loc-weather-banner .gb-weather-clock { font-size: .95rem; }

@media (max-width: 1024px) {
    .gb-town-banner-col .gb-town-banner-copy { padding-right: 150px; } /* room for the weather tile */
    .gb-loc-col-right > .gb-loc-weather { display: none; } /* the banner carries the phone copy */
}

/* ---- desktop: -col stays in the left column; -wide runs across the content ---- */
@media (min-width: 1025px) {
    .gb-town-banner .gb-loc-weather-banner { display: none; } /* the right column carries the desktop copy */
    .gb-town-banner-col { min-height: 230px; }
    .gb-town-banner-col .gb-loc-heading-main { font-size: clamp(1.45rem, 1.9vw, 2.4rem); }
    .gb-town-banner-col .gb-loc-heading-sub { font-size: clamp(1rem, 1.2vw, 1.5rem); }
    .gb-town-banner-wide { min-height: 240px; }
    .gb-town-banner-wide .gb-town-banner-copy { padding: 22px 28px 26px; }
    .gb-town-banner-wide .gb-page-title { font-size: clamp(2rem, 2.8vw, 3rem); }
    .gb-town-banner-wide .gb-page-intro { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    .gb-town-banner-scene * { animation: none !important; transition: none !important; }
}
