/* Custom styles on top of Bootstrap */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Home page: region links as floating paint blobs. Each has its own colour,
   tilt, size and bobbing speed (set inline); overlapping blobs show through each
   other, and hovering one stops it and makes it solid. */
.region-blobs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    /* Narrow enough that six blobs wrap into two rows of three on a wide screen,
       instead of squeezing into one long strip. */
    max-width: 800px;
    margin: 0 auto;
}

/* The link itself never moves or changes shape: it is a fixed ellipse that catches
   the pointer. The coloured blob (.blob-body) bobs and morphs inside it and ignores
   the pointer. When the blob moved itself, the thing under the pointer changed every
   frame and the cursor flickered as the pointer moved over it. */
.region-blob {
    --r1: 62% 38% 54% 46% / 55% 44% 56% 45%;
    --r2: 41% 59% 38% 62% / 60% 40% 60% 40%;
    display: block;
    width: var(--w);
    max-width: 92vw;
    height: calc(var(--w) * 0.68);
    margin: -6px -8px;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
}

.blob-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    pointer-events: none;
    background: color-mix(in srgb, var(--c) 90%, transparent);
    border-radius: var(--r1);
    transform: rotate(var(--t));
    animation: blob-bob var(--dur) ease-in-out infinite, blob-morph calc(var(--dur) * 2) ease-in-out infinite;
    transition: transform 0.3s;
}

.region-blob.shape-b { --r1: 42% 58% 44% 56% / 52% 60% 40% 48%; --r2: 60% 40% 55% 45% / 42% 55% 45% 58%; }
.region-blob.shape-c { --r1: 55% 45% 62% 38% / 40% 56% 44% 60%; --r2: 38% 62% 40% 60% / 58% 42% 58% 42%; }

.region-blob:hover,
.region-blob:focus-visible {
    color: #fff;
    text-decoration: none;
    z-index: 2;
}

.region-blob:hover .blob-body,
.region-blob:focus-visible .blob-body {
    animation-play-state: paused;
    background: var(--c);
    transform: scale(1.1);
}

.region-blob:focus-visible {
    outline: 3px solid #111;
    outline-offset: 4px;
}

.region-name {
    padding: 0 0.6rem;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-size: calc(var(--w) * 0.125);
    line-height: 1;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* The place under the name ("Oregon, USA"), kept quiet on purpose. It is white at 88% on a
   translucent blob, which measures about 3.4:1 to 4.3:1 (the target for small text is 4.5:1);
   that was a choice made for a calmer look. The List and Map views show the same place
   in plain dark text. */
.region-place {
    margin-top: 0.25rem;
    padding: 0 0.6rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
}

/* A blob or row hidden by the search must stay hidden whatever display it is given */
.region-blob[hidden],
.region-blobs[hidden],
.picker-list-view[hidden],
.picker-map-view[hidden],
.picker-list-view section[hidden],
.picker-list li[hidden],
.picker-key li[hidden],
.picker-pin[hidden],
.picker-status[hidden],
.picker-note[hidden] {
    display: none !important;
}

/* Home page picker: the Blobs / List / Map toggle and the search box above the regions */
.picker-bar,
.picker-list-view,
.picker-map-view,
.picker-status {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.picker-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.picker-toggle {
    display: inline-flex;
    padding: 4px;
    background: #e9eaee;
    border-radius: 999px;
}

.picker-toggle-button {
    min-height: 44px;
    padding: 0 1.1rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #444;
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
    cursor: pointer;
}

.picker-toggle-button[aria-pressed="true"] {
    background: #111;
    color: #fff;
}

.picker-toggle-button:focus-visible,
.picker-search-input:focus-visible,
.picker-row:focus-visible,
.picker-key a:focus-visible,
.picker-pin:focus-visible {
    outline: 3px solid #1c78c0;
    outline-offset: 2px;
}

.picker-search {
    position: relative;
    display: block;
    flex: 1 1 200px;
    margin: 0;
}

.picker-search::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 1.1rem;
    height: 1.1rem;
    transform: translateY(-50%);
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
    pointer-events: none;
}

.picker-search-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    padding: 0 1.1rem 0 2.75rem;
    border: 1px solid #c9cad1;
    border-radius: 999px;
    background: #fff;
    font: 1rem 'Inter', system-ui, sans-serif;
}

/* What the search found, or that it found nothing */
.picker-status {
    margin-top: 1rem;
    color: #495057;
    text-align: center;
}

/* List view: grouped by country, one tall tile per region */
.picker-country {
    margin: 1.1rem 0 0.5rem;
    color: #555;
    font: 600 0.9rem 'Inter', system-ui, sans-serif;
}

.picker-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.picker-row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 0.9rem;
    box-sizing: border-box;
    min-height: 68px;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #dcdde2;
    border-radius: 16px;
    color: #111;
    text-decoration: none;
}

.picker-row:hover {
    border-color: #111;
    box-shadow: 0 0 0 2px #111;
    color: #111;
}

.picker-dot,
.picker-pin-dot {
    display: block;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #b5b6bd;
}

.picker-row .picker-dot { width: 22px; height: 22px; }
.picker-key .picker-dot { width: 14px; height: 14px; }

.picker-row-text {
    display: block;
}

.picker-row-name {
    display: block;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-size: 1.3rem;
    line-height: 1.1;
}

.picker-row-place {
    display: block;
    color: #5a5a5a;
    font-size: 0.85rem;
}

.picker-count {
    color: #444;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Map view: one map, a coloured dot per region, and a key under it */
.picker-map {
    position: relative;
    height: 380px;
    overflow: hidden;
    background: #eef0f3;
    border: 1px solid #dcdde2;
    border-radius: 22px;
}

/* The dot is small (16px), but the link around it is a comfortable 32px to hit */
.picker-pin {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.picker-pin-dot {
    width: 16px;
    height: 16px;
    transition: transform 0.15s;
}

.picker-pin:hover .picker-pin-dot,
.picker-pin.on .picker-pin-dot,
.picker-pin:focus-visible .picker-pin-dot {
    transform: scale(1.6);
}

.picker-pin.on {
    z-index: 5;
}

.picker-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.picker-key a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 32px;
    color: #333;
    text-decoration: none;
}

.picker-key a:hover {
    text-decoration: underline;
}

.picker-note {
    margin: 0.6rem 0 0;
    color: #5a5a5a;
    font-size: 0.8rem;
}

.picker-note-warn {
    color: #8a3b00;
}

@media (max-width: 575.98px) {
    .picker-map { height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    .picker-pin-dot { transition: none; }
}

@keyframes blob-bob {
    0%, 100% { transform: translateY(0) rotate(var(--t)); }
    50% { transform: translateY(-9px) rotate(calc(var(--t) * -0.6)); }
}

@keyframes blob-morph {
    0%, 100% { border-radius: var(--r1); }
    50% { border-radius: var(--r2); }
}

@media (prefers-reduced-motion: reduce) {
    .blob-body { animation: none; transition: none; }
}

/* Page header layout. Desktop keeps the original two-column look (logo
   stacked above search/filters on the left, region info + buttons on the
   right) while narrow/stacked screens get a different reading order:
   logo, then region info + buttons, then search/filters - see WEBSITE-54
   follow-up. A CSS grid (rather than flex order) is what lets the same
   three blocks be arranged completely differently at each breakpoint
   without duplicating any markup. */
.header-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "logo"
        "region"
        "search"
        "filters";
    gap: 1rem;
}

.header-logo {
    grid-area: logo;
}

.header-region {
    grid-area: region;
}

.header-filters {
    grid-area: filters;
}

.header-search {
    grid-area: search;
    /* Only meaningful when stacked (see below) - separates it from the
       region/buttons block above it now that they're no longer adjacent
       in the desktop two-column layout. */
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

@media (min-width: 768px) {
    /* A compact header: the left column is the logo, search and filters; the
       right column is the region title, the subtitle and the buttons, which
       line up with the search box and the filters. .header-region is
       flattened with display: contents so its title, subtitle and buttons
       can sit in this grid without duplicating any markup. */
    .header-grid {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo    title"
            "search  sub"
            "filters actions";
        column-gap: 1.5rem;
        row-gap: 0.5rem;
        align-items: center;
        /* The region title's blob reaches ~0.55em above the text; without this
           it gets clipped by the top of the page. */
        padding-top: 0.75rem;
    }

    /* Level with the region title's line, not centred in its row */
    .header-logo {
        align-self: start;
        padding-top: 0.2rem;
    }

    .header-region {
        display: contents;
    }

    .header-region .region-title {
        grid-area: title;
        justify-self: end;
    }

    .header-region .lead {
        grid-area: sub;
        justify-self: end;
    }

    .header-region > .d-flex {
        grid-area: actions;
        justify-self: end;
        align-self: end;
    }

    .header-search {
        /* Sits beside the subtitle here, not below the region block, so the
           divider from the stacked layout doesn't apply. */
        border-top: none;
        padding-top: 0;
        max-width: 420px;
    }

    /* Desktop header: 0.5rem between grid rows, plus this, makes the search box sit 0.75rem above the first
       row of filters, the same as the rows are from each other */
    .header-filters {
        padding-top: 0.25rem;
    }

    .header-filters .filter-bar {
        row-gap: 0.75rem;
    }
}

/* The header's own margin is the space before the results line; nothing extra from the filter bar */
.header-filters .filter-bar {
    margin-bottom: 0;
}

/* Shown in place of the event table when nothing matches (drawn by filterPanel.js) */
.empty-state {
    max-width: 34rem;
    margin: 1.5rem auto 2rem;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #fff;
    border: 2.5px solid var(--ink, #111);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--ink, #111);
}

.empty-state-title {
    margin: 0 0 0.5rem;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--region-c, #111);
}

.empty-state-text {
    margin: 0 0 1.25rem;
    color: #495057;
    text-wrap: balance;
}

.empty-state-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state-clear {
    padding: 0.4rem 1rem;
    border: 2.5px solid var(--ink, #111);
    border-radius: 14px 18px 13px 17px;
    box-shadow: 4px 4px 0 var(--ink, #111);
    background: var(--region-c, #111);
    color: #fff;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.empty-state-clear:hover,
.empty-state-clear:focus-visible {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--ink, #111);
    background: var(--region-c, #111);
    border-color: var(--ink, #111);
    color: #fff;
}

.empty-state-add {
    text-wrap: balance;
    color: var(--ink, #111);
    font-weight: 600;
    text-decoration-color: var(--region-c, #111);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .empty-state-clear { transition: none; }
}

/* Home page: "Don't see your city?" and the Add my area button (areaRequest.js) */
.request-area {
    margin: 2.5rem auto 1rem;
    text-align: center;
}

.request-area-hint {
    margin: 0 0 0.75rem;
    color: #495057;
}

.request-area-button {
    padding: 0.5rem 1.4rem;
    background: #fff;
    color: #111;
    border: 2.5px solid #111;
    border-radius: 14px 18px 13px 17px;
    box-shadow: 4px 4px 0 #111;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.request-area-button:hover,
.request-area-button:focus-visible {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #111;
}

.request-area-button:focus-visible {
    outline: 3px solid #1c78c0;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .request-area-button { transition: none; }
}

/* Table styles */
.event-table {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

/* Ensure table header stays sticky within table-responsive */
.table-responsive {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.event-table thead {
    background-color: white;
    z-index: 10;
}

.event-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    padding: 8px;
}

.event-table tbody td {
    vertical-align: middle;
}

/* Adjust column widths */
.event-table th:nth-child(1),
.event-table td:nth-child(1) {
    width: 15%;
}

.event-table th:nth-child(2),
.event-table td:nth-child(2) {
    width: 17%;
}

.event-table th:nth-child(3),
.event-table td:nth-child(3) {
    width: 36%;
}

.event-table th:nth-child(4),
.event-table td:nth-child(4) {
    width: 20%;
}

.event-table th:nth-child(5),
.event-table td:nth-child(5) {
    width: 12%;
}

/* Search bar styles */
#searchBarContainer {
    background-color: #f8f9fa;
    padding: 4px 0;
    margin-bottom: 0;
}

/* In the header the filters follow directly: the box's own 4px of bottom padding would make the gap to the
   first row of filters look 4px bigger than the gap between the rows */
.header-search #searchBarContainer {
    padding-bottom: 0;
}

#searchBar {
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 400px;
}

/* The venue names offered under the search box as the visitor types (venueSuggest.js) */
#searchBarContainer {
    position: relative;
}

.venue-suggest {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 400px;
    margin-top: 4px;
    padding: 0.25rem;
    border: 2px solid var(--ink, #111);
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: var(--pop-shadow, 3px 3px 0 #111);
}

.venue-suggest[hidden] {
    display: none;
}

.venue-suggest-option {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem; /* big enough to tap */
    border-radius: 0.5rem;
    cursor: pointer;
}

.venue-suggest-option[aria-selected="true"],
.venue-suggest-option:hover {
    background: var(--region-tint, #e9ecef);
}

.venue-suggest-count {
    flex: none;
    color: #495057;
    font-size: 0.85rem;
}

/* Tag chips */
.tag-chip {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px 4px 2px 0;
    /* Sized to the text, not 999px: on one line it is still a full pill (the
       radius caps at half the height), but a chip whose text wraps in a narrow
       column becomes a tidy rounded rectangle instead of a blob. */
    border-radius: 1em;
    text-align: center;
    text-wrap: balance;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.6;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.tag-chip:hover {
    filter: brightness(0.9);
}

/* A selected chip is left at its normal appearance - the unselected chips
   dimming around it (below) is what signals the selection. */

.tag-chip.dimmed {
    opacity: 0.35;
    filter: grayscale(60%);
}

.tag-chip.dimmed:hover {
    opacity: 0.6;
}

/* Event image styles */
.event-image {
    max-width: 150px;
    max-height: 130px;
    border-radius: 4px;
}

/* A venue's logo shown for an event with no picture of its own: kept whole (not cropped)
   on a white tile so a transparent logo stays readable */
.event-image.venue-logo {
    background: #fff;
    object-fit: contain;
    padding: 6px;
    max-width: 150px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .event-table {
        font-size: 0.9rem;
    }
}

/* Modal styles for image popup */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.78);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: min(600px, 88vw);
    max-height: 500px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    object-fit: contain;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 14px;
    box-shadow: 7px 7px 0 var(--region-c, #ffd23f);
}

/* Feedback form styles */
.feedback-button {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #fff;
    color: #111;
    border: 2.5px solid #111;
    border-radius: 50%;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 3px 3px 0 #111;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-button:hover,
.feedback-button:focus-visible {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #111;
}

.feedback-button:focus-visible,
.feedback-close:focus-visible,
.notify-close:focus-visible,
.feedback-form button:focus-visible,
.site-form button:focus-visible,
.feedback-success button:focus-visible,
.notify-form button:focus-visible {
    outline: 3px solid #1c78c0;
    outline-offset: 2px;
}

.feedback-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.feedback-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 28px 28px 22px;
    border: 2.5px solid #111;
    border-radius: 18px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 6px 6px 0 #111;
}

.feedback-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    box-shadow: 2px 2px 0 #111;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #111;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.feedback-close:hover {
    color: #111;
    box-shadow: 1px 1px 0 #111;
}

.feedback-form h3 {
    margin: 0 44px 18px 0;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.1;
    color: #111;
}

.feedback-form .form-group,
.site-form .form-group {
    margin-bottom: 20px;
}

.feedback-form label,
.site-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
}

.feedback-form input,
.feedback-form textarea,
.feedback-form select,
.site-form input,
.site-form textarea,
.site-form select {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 12px;
    font-size: 15px;
    color: #111;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.feedback-form input:focus,
.feedback-form textarea:focus,
.feedback-form select:focus,
.site-form input:focus,
.site-form textarea:focus,
.site-form select:focus {
    outline: none;
    border-color: var(--region-c, #111);
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--region-c, #111) 40%, transparent);
}

.feedback-form textarea,
.site-form textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-form button,
.site-form button {
    background-color: var(--region-c, #111);
    color: #fff;
    border: 2.5px solid #111;
    border-radius: 14px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 4px 4px 0 #111;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.feedback-form button:hover,
.site-form button:hover {
    background-color: var(--region-c, #111);
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #111;
}

.feedback-form button:disabled,
.site-form button:disabled {
    background-color: #adb5bd;
    transform: none;
    box-shadow: 4px 4px 0 #111;
    cursor: not-allowed;
}

.feedback-success {
    text-align: center;
    padding: 40px 20px;
}

.feedback-success h3 {
    margin: 0 0 12px;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.1;
    color: #111;
}

.feedback-success p {
    color: #495057;
    margin-bottom: 20px;
}

.feedback-success button {
    background-color: var(--region-c, #111);
    color: #fff;
    border: 2.5px solid #111;
    border-radius: 14px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 4px 4px 0 #111;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.feedback-success button:hover {
    background-color: var(--region-c, #111);
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #111;
}

/* Notify button styles */
.notify-button {
    background-color: #0d6efd;
    color: white;
    border: 1px solid #0d6efd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0;
    display: block;
    margin-top: 4px;
}

.notify-button:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.notify-button svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.notify-button:disabled {
    background-color: #0d6efd !important;
    color: white !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

/* Notify modal styles */
.notify-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.notify-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 28px 28px 22px;
    border: 2.5px solid #111;
    border-radius: 18px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 6px 6px 0 #111;
}

.notify-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    box-shadow: 2px 2px 0 #111;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #111;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.notify-close:hover {
    color: #111;
    box-shadow: 1px 1px 0 #111;
}

.notify-form h3 {
    margin: 0 44px 18px 0;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.1;
    color: #111;
}

.notify-form .form-group {
    margin-bottom: 20px;
}

.notify-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
}

.notify-form select {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #111;
    border-radius: 12px;
    font-size: 15px;
    color: #111;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.notify-form select:focus {
    outline: none;
    border-color: var(--region-c, #111);
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--region-c, #111) 40%, transparent);
}

.notify-form button {
    background-color: var(--region-c, #111);
    color: #fff;
    border: 2.5px solid #111;
    border-radius: 14px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 4px 4px 0 #111;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    margin: 0 10px 10px 0;
}

.notify-form button:hover {
    background-color: var(--region-c, #111);
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #111;
}

.notify-form button.secondary {
    background-color: #fff;
    color: #111;
}

.notify-form button.secondary:hover {
    background-color: #fff;
}

.event-info {
    background-color: color-mix(in srgb, var(--region-c, #111) 10%, #fff);
    padding: 14px 16px;
    border: 2px solid #111;
    border-radius: 12px;
    margin-bottom: 20px;
}

.event-info h4 {
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
}

.event-info p {
    margin-bottom: 4px;
    color: #495057;
}

/* Filter bar (filterPanel.js): one dropdown per filter type, in a single row
   when there is room; each opens a popover of tag options. */
.filter-bar {
    position: relative;   /* anchors the full-width popovers used on phones */
    display: flex;
    flex-wrap: wrap;
    /* Rows (When / Medium / ... then "Use my location") are as far apart as the search box is from the first
       row: 1rem when the header is stacked, 0.75rem in the desktop header (see .header-filters below) */
    gap: 1rem 0.4rem;
    margin-bottom: 0.75rem;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background-color: white;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.filter-dropdown-toggle:hover {
    border-color: #adb5bd;
}

.filter-dropdown-toggle[aria-expanded="true"],
.filter-dropdown-toggle.has-selection {
    border-color: #0d6efd;
    color: #0d6efd;
}

.filter-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.15s ease;
}

.filter-dropdown-toggle[aria-expanded="true"] .filter-caret {
    transform: rotate(180deg);
}

.filter-badge {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background-color: #0d6efd;
    color: white;
    font-size: 0.75rem;
    line-height: 1.4rem;
    text-align: center;
}

/* Above the sticky table header (Bootstrap's .sticky-top is 1020) */
.filter-popover {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 1030;
    min-width: 15rem;
    padding: 0.5rem 0.9rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Medium has the most options, so its popover is wider, in two columns */
.filter-dropdown[data-group="medium"] .filter-popover {
    width: 30rem;
    max-width: calc(100vw - 2rem);
}

.filter-dropdown[data-group="medium"] .filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
}

/* Top-aligned so the checkbox, dot and count sit on the name's first line,
   whether or not the option has a hint line under it */
.filter-option {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.25rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4rem;
}

.filter-option input {
    flex: none;
    margin: 0.28rem 0 0;
}

.filter-option.is-empty {
    opacity: 0.45;
    cursor: default;
}

.filter-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex: none;
    margin-top: 0.375rem;
}

.filter-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.filter-hint {
    display: block;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #6c757d;
}

.filter-n {
    margin-left: auto;
    padding-left: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-variant-numeric: tabular-nums;
}

/* The "Open on" dates under the When phases (WEBSITE-94) */
.filter-section {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.filter-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.filter-section-note {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #6c757d;
}

/* While a date is chosen the phases above are not used, so they are greyed out */
.filter-option.is-overridden {
    opacity: 0.45;
}

.filter-dates {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.filter-date {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.filter-date input {
    min-width: 0;
    padding: 0.25rem 0.4rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font: inherit;
    font-size: 1rem;      /* 16px or more, or iOS zooms the page in when the field is focused */
    color: #212529;
}

/* The When popover is the tallest (phases, dates, a range), so it scrolls inside itself rather than off the screen */
.filter-dropdown[data-group="when"] .filter-popover {
    max-height: min(75vh, 34rem);
    overflow-y: auto;
}

/* Result count, active filters and "Clear all" */
.filter-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-bottom: 0.75rem;
    min-height: 1.75rem;
    font-size: 0.9rem;
}

.filter-result-count {
    color: #495057;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.25rem 0.1rem 0.7rem;
    border-radius: 999px;
    background-color: #e7f1ff;
    color: #0a58ca;
}

.filter-pill button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.35rem;
    cursor: pointer;
}

.filter-pill button:hover {
    color: #08418e;
}

.filter-clear {
    padding: 0;
}

/* "Use my location" (nearMeControl.js): a button in the filter bar, a note under it, and a
   "1.4 mi away" line in each event's Links cell once the visitor has shared where they are. */
.near-me {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.near-me-main svg {
    flex: none;
}

.near-me-main:disabled {
    opacity: 0.7;
    cursor: progress;
}

.near-me-off {
    padding: 0.2rem 0.4rem;
    border: 0;
    background: transparent;
    color: #0d6efd;
    font: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
}

.near-me-off:hover {
    text-decoration: none;
}

.near-me-note {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #495057;
}

.near-me-note[hidden] {
    display: none;
}

.near-me-message {
    font-weight: 600;
}

/* The (i) beside the button, and the bubble it opens */
.near-me {
    position: relative;
}

.near-me-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
}

.near-me-info:hover,
.near-me-info[aria-expanded="true"] {
    color: #212529;
}

.near-me-bubble {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: max-content;
    max-width: min(17rem, calc(100vw - 2rem));
    padding: 0.55rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    color: #212529;
}

.near-me-bubble::before {
    content: "";
    position: absolute;
    left: var(--arrow-x, 1.5rem);
    top: -7px;
    width: 12px;
    height: 12px;
    border-top: inherit;
    border-left: inherit;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
}

.near-me-bubble[hidden] {
    display: none;
}

.region-page .near-me-bubble {
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

/* "List view | Map view" (mapView.js): a two-segment control on the results line, beside "Showing X of Y
   events". On phones it spans the width above the count, with thumb-sized segments. */
.results-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    /* The header above ends with its own 1rem margin; a little less here keeps this line close to the action
       buttons and the filters */
    margin: -0.25rem 0 0.75rem;
}

.results-bar .filter-summary {
    flex: 1 1 12rem;
    min-height: 0;
    margin-bottom: 0;
}

.view-toggle {
    display: inline-flex;
    flex: none;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    background-color: #fff;
    overflow: hidden;
}

.view-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0.15rem 0.85rem;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: var(--control-font-size, 0.9rem);
    font-weight: 600;
    cursor: pointer;
}

.view-toggle button svg {
    flex: none;
    width: 14px;
    height: 14px;
}

.view-toggle button[aria-pressed="true"] {
    background-color: #0d6efd;
    color: #fff;
}

.view-toggle button + button {
    border-left: 1px solid #dee2e6;
}

.region-page .view-toggle {
    border: 2px solid var(--ink);
    box-shadow: var(--pop-shadow);
}

.region-page .view-toggle button + button {
    border-left: 2px solid var(--ink);
}

.region-page .view-toggle button[aria-pressed="true"] {
    background-color: var(--region-c);
}

@media (max-width: 575.98px) {
    /* Like tabs above the results: full width, equal segments, easy to hit */
    .view-toggle {
        order: -1;
        width: 100%;
    }
    .view-toggle button {
        flex: 1;
        min-height: 44px;
        font-size: 1rem;
    }
    .view-toggle button svg {
        width: 16px;
        height: 16px;
    }
}

.map-view {
    margin-bottom: 1rem;
}

.map-canvas {
    height: min(70vh, 640px);
    min-height: 340px;
    border: 2px solid var(--ink, #212529);
    border-radius: 14px;
    overflow: hidden;
}

.map-status,
.map-message {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.map-status[hidden],
.map-message[hidden] {
    display: none;
}

.map-note {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* The pins (mapView.js): "61 places · 213 shows", a way out when nothing matches, the list of places, the popup
   and the visitor's dot */
.map-pin-summary {
    margin: 0 0 0.5rem;
    font-size: var(--control-font-size, 0.9rem);
    font-weight: 600;
    color: #495057;
}

.map-clear {
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--region-c, #0d6efd);
    font: inherit;
    font-size: var(--control-font-size, 0.9rem);
    text-decoration: underline;
    cursor: pointer;
}

.map-pin-summary[hidden],
.map-clear[hidden],
.map-places[hidden] {
    display: none;
}

.map-places {
    margin-top: 0.75rem;
    font-size: var(--control-font-size, 0.9rem);
}

.map-places summary {
    cursor: pointer;
    font-weight: 600;
}

.map-places ul {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 14rem;
    margin: 0.5rem 0 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.map-places button {
    padding: 0.15rem 0;
    border: 0;
    background: none;
    color: var(--region-c, #0d6efd);
    font: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.maplibregl-popup-content {
    padding: 0.75rem 0.9rem;
    border: 2px solid var(--ink, #212529);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--ink, #212529);
    font-family: inherit;
    font-size: 0.9rem;
}

.map-popup {
    max-height: 16rem;
    overflow: auto;
}

.map-popup-venue + .map-popup-venue {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.map-popup-title {
    margin: 0 1.25rem 0.15rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.map-popup-address,
.map-popup-distance {
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    color: #495057;
}

.map-popup-shows {
    margin: 0.35rem 0;
    padding: 0;
    list-style: none;
}

.map-popup-shows li {
    margin-bottom: 0.3rem;
}

.map-popup-dates {
    display: block;
    font-size: 0.82rem;
    color: #6c757d;
}

.map-popup-map {
    font-size: 0.85rem;
}

/* On a phone or any touch screen: fingertip-sized targets for what the map adds (about 40 px; MapLibre's own
   zoom buttons are 29 px, the popup's close button 21 px, and a line of text in a list is 22 px) */
@media (max-width: 768px), (pointer: coarse) {
    .map-view .maplibregl-ctrl-group button {
        width: 40px;
        height: 40px;
    }

    .map-places summary {
        padding: 0.6rem 0;
    }

    .map-places ul {
        gap: 0;
    }

    .map-places button {
        padding: 0.65rem 0;
    }

    .maplibregl-popup-close-button {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .map-popup-title {
        margin-right: 2.25rem;   /* clear of the bigger close button */
    }

    .map-popup-shows a,
    .map-popup-map {
        display: inline-block;
        padding: 0.3rem 0;
    }

    .near-me-info {
        width: 36px;
        height: 36px;
    }
}

/* The "Apple Maps / Google Maps" choice that a Map link opens on an iPhone, iPad or Mac (mapChoice.js) */
.map-choice {
    position: fixed;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    min-width: 9.5rem;
    padding: 0.25rem;
    border: 2px solid var(--ink, #111);
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: var(--pop-shadow, 3px 3px 0 #111);
}

.map-choice-item {
    display: block;
    padding: 0.6rem 0.8rem; /* big enough to tap */
    border-radius: 0.4rem;
    color: var(--ink, #111);
    font-size: 1rem;
    text-decoration: none;
}

.map-choice-item:hover,
.map-choice-item:focus-visible {
    background: var(--region-tint, #e9ecef);
    outline: none;
}

/* "You are here": a blue dot with a soft ring */
.map-you {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #0d6efd;
    box-shadow: 0 0 0 2px #0d6efd, 0 0 0 7px rgba(13, 110, 253, 0.25);
}

/* With the map showing, the table (and its "nothing matches" card) step aside; the summary line stays */
.map-view-on .table-responsive:has(> #eventTable),
.map-view-on .empty-state {
    display: none;
}

/* The venue's name in the "title @ venue" cell: reads as text, shows it is a link on hover and focus */
.venue-link {
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 0.18em;
}

.venue-link:hover,
.venue-link:focus-visible {
    color: var(--region-c, inherit);
    text-decoration: underline;
}

/* The Event Page and Map links in the Links column */
.event-link {
    font-size: var(--control-font-size, 0.9rem);
}

.event-distance {
    display: block;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

.event-distance[hidden],
.near-me-message[hidden] {
    display: none;
}

.region-page .near-me-off {
    color: var(--region-c);
}

@media (max-width: 768px) {
    /* Tighter buttons so all four filters fit on one line of a phone */
    .filter-bar {
        gap: 1rem 0.4rem;
    }
    .filter-dropdown-toggle {
        padding: 0.35rem 0.6rem;
        gap: 0.3rem;
        font-size: 0.875rem;
    }
    /* Popovers open full width under the whole row of buttons, not under one button */
    .filter-dropdown {
        position: static;
    }
    .filter-popover,
    .filter-dropdown[data-group="medium"] .filter-popover {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
    }
    .filter-option {
        padding: 0.45rem 0;   /* larger touch targets */
    }
}

/* ---- Region pages (WEBSITE-61): the home page's blobs carried inside ------
   Each region page sets --region-c (its blob colour from the home page) and
   --region-t (a tilt) on <body>. Everything below hangs off that, so a new
   region only needs those two values. Buttons and filter chips borrow the pop
   sticker look: dark outline, hard shadow, press down on hover. */
.region-page {
    --ink: #111;
    /* One size for the buttons (header actions, filters, "Use my location", List/Map view) and the Event Page
       and Map links */
    --control-font-size: 0.9rem;
    --pop-shadow: 3px 3px 0 var(--ink);
    --region-tint: color-mix(in srgb, var(--region-c) 22%, #fff);
}

.region-page header {
    position: relative;
    isolation: isolate;
    /* Above the table below it: the filter dropdowns open from inside the
       header and have to overlap the table's sticky header row. */
    z-index: 20;
}

/* A soft blob of the region's colour behind the title */
.region-page .region-title {
    position: relative;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.05;
    color: var(--region-c);
}

.region-page .region-title::before {
    content: '';
    position: absolute;
    z-index: -1;
    /* Everything here is in em, so the bubble keeps the same padding and the
       same corner roundness around any region name and scales smoothly with the
       title as the window changes. (Percentage radii made it a flat ellipse
       for long names and a round blob for short ones.) The sides overhang by
       0.4em, which stays inside the page margin even on a phone, so no
       breakpoint is needed. */
    inset: -0.5em -0.4em -0.4em -0.4em;
    background: color-mix(in srgb, var(--region-c) 14%, transparent);
    border-radius: 1.7em 1.2em 1.6em 1.3em / 1em 0.9em 1em 0.95em;
    transform: rotate(var(--region-t));
}

.region-page .header-region .lead {
    font-size: 1.05rem;
}

/* "Oregon, USA" under the region's title (regionPlace.js fills it). It keeps its height while
   empty so the header does not jump when the text arrives. */
.region-page .region-place-line {
    min-height: 1.5em;
    margin: -0.25rem 0 0.75rem;
    color: #495057;
    font-size: 0.95rem;
}

/* Keep the venues link in one piece when the subtitle line wraps */
.region-page .header-region .lead a {
    white-space: nowrap;
}

/* Action buttons: sticker style */
.region-page header .btn {
    font-size: var(--control-font-size);
    padding: 0.4rem 1rem;
    border: 2.5px solid var(--ink);
    border-radius: 14px 18px 13px 17px;
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--ink);
    background: #fff;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.region-page header .btn-primary {
    background: var(--region-c);
    color: #fff;
}

.region-page header .btn-outline-primary {
    background: var(--region-tint);
}

.region-page header .btn:hover,
.region-page header .btn:focus-visible {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--ink);
    color: var(--ink);
    border-color: var(--ink);
}

.region-page header .btn-primary:hover,
.region-page header .btn-primary:focus-visible {
    background: var(--region-c);
    color: #fff;
}

.region-page header .btn-outline-secondary:hover { background: #fff; }
.region-page header .btn-outline-primary:hover { background: var(--region-tint); }

.region-page .header-region a:not(.btn) {
    color: var(--region-c);
    font-weight: 600;
}

/* Search box and filter buttons */
.region-page #searchBar {
    border: 2px solid var(--ink);
    box-shadow: var(--pop-shadow);
}

.region-page #searchBar:focus {
    border-color: var(--region-c);
    box-shadow: var(--pop-shadow), 0 0 0 0.2rem color-mix(in srgb, var(--region-c) 25%, transparent);
}

.region-page .filter-dropdown-toggle {
    font-size: var(--control-font-size);
    border: 2px solid var(--ink);
    box-shadow: var(--pop-shadow);
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.region-page .filter-dropdown-toggle:hover {
    border-color: var(--ink);
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.region-page .filter-dropdown-toggle[aria-expanded="true"],
.region-page .filter-dropdown-toggle.has-selection {
    border-color: var(--ink);
    background-color: var(--region-c);
    color: #fff;
}

.region-page .filter-badge {
    background-color: #fff;
    color: var(--region-c);
    font-weight: 700;
}

.region-page .filter-popover {
    border: 2px solid var(--ink);
    border-radius: 14px;
    box-shadow: 5px 5px 0 var(--ink);
}

.region-page .filter-pill {
    border-color: var(--region-c);
}

.region-page .filter-clear,
.region-page .filter-summary a {
    color: var(--region-c);
}

/* Event table */
.region-page .event-table thead th {
    border-bottom: 3px solid var(--region-c);
}

.region-page .event-table tbody tr:hover > td {
    background-color: color-mix(in srgb, var(--region-c) 7%, transparent);
}

/* Event Page / Map links (and the venue links on the venues pages): dark text,
   underlined in the region colour, so a column of them stays calm. The main
   link in each row is semibold; the region colour takes over the text on hover. */
.region-page .event-table td a {
    color: var(--ink);
    font-weight: 400;
    text-decoration-color: var(--region-c);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.region-page .event-table td:nth-child(5) a:first-of-type,
.region-page #venueTable td:first-child a {
    font-weight: 600;
}

.region-page .event-table td a:hover {
    color: var(--region-c);
}

/* Venue names on the venues pages have no underline, so colour is what marks
   them as links. */
.region-page #venueTable td:first-child a {
    color: var(--region-c);
}

.region-page #venueTable td:first-child a:hover {
    color: color-mix(in srgb, var(--region-c) 65%, #000);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.region-page .event-table .event-image {
    border: 2px solid var(--ink);
    border-radius: 10px;
    box-shadow: var(--pop-shadow);
}

.region-page .notify-button,
.region-page .notify-button:disabled {
    /* A block-level flex box that is only as wide as its content, so it always
       sits on its own line under the links, however wide the column is. */
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    padding: 0.2rem 0.65rem;
    background-color: #fff !important;
    color: var(--ink) !important;
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

/* Narrow windows: the table has to fit without scrolling sideways. The
   "Notify Me" label can't wrap, so it kept the Links column ~65px wider than
   the links need, and the image column was held open by the thumbnails' natural
   width. Show just the bell (it keeps its name via aria-label and a tooltip) and
   cap the thumbnails. */
@media (max-width: 767.98px) {
    .region-page .notify-button {
        padding: 0.3rem 0.45rem;
    }

    .region-page .notify-button span {
        display: none;
    }

    .region-page .notify-button svg {
        width: 16px;
        height: 16px;
    }

    .region-page .event-table .event-image {
        max-width: 100px;
    }
}

.region-page .notify-button:hover,
.region-page .notify-button:focus-visible {
    background-color: var(--region-c) !important;
    color: #fff !important;
    border-color: var(--ink);
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 var(--ink);
}

/* Phones (under 576px): the event list is a stack of cards instead of a table, so
   nothing scrolls sideways (WEBSITE-91). Each row becomes a card: the thumbnail on the
   left, then the show @ venue, the dates and the tags; the links and the bell along the
   bottom. Only the event table (#eventTable); the venues table is unchanged. From
   576px up it is still a table. */
@media (max-width: 575.98px) {
    /* The page scrolls normally, rather than the list scrolling inside its own box */
    .region-page .table-responsive:has(> #eventTable) {
        max-height: none;
        overflow: visible;
    }

    .region-page #eventTable,
    .region-page #eventTable tbody {
        display: block;
    }

    .region-page #eventTable {
        background: transparent;
        box-shadow: none;
    }

    /* The column headings aren't shown (a card says what it is) but stay for screen readers */
    .region-page #eventTable thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .region-page #eventTable tbody tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "image title"
            "image date"
            "image tags"
            "links links";
        align-items: start;
        margin: 0 0 1rem;
        padding: 0.75rem;
        background: #fff;
        border: 2.5px solid var(--ink);
        border-radius: 16px;
        box-shadow: 4px 4px 0 var(--ink);
    }

    .region-page #eventTable tbody td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    /* Thumbnail. With no image (or one that failed to load) the cell is empty and
       takes no room, so the text uses the full width. */
    .region-page #eventTable td:nth-child(1) {
        grid-area: image;
        padding-right: 0.75rem;
    }

    .region-page #eventTable td:nth-child(1):empty {
        display: none;
    }

    .region-page #eventTable td:nth-child(1) .event-image {
        display: block;
        max-width: 96px;
    }

    .region-page #eventTable td:nth-child(3) {
        grid-area: title;
        font-weight: 600;
        line-height: 1.3;
    }

    .region-page #eventTable td:nth-child(2) {
        grid-area: date;
        margin-top: 0.2rem;
        font-size: 0.85rem;
        color: #495057;
    }

    .region-page #eventTable td:nth-child(4) {
        grid-area: tags;
        margin-top: 0.45rem;
    }

    .region-page #eventTable td:nth-child(5) {
        grid-area: links;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 1rem;
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1.5px dashed #ced4da;
    }

    /* The links are flex items here, so this padding makes them easier to tap */
    .region-page #eventTable td:nth-child(5) a {
        padding: 0.4rem 0;
    }

    /* Room for the full label again, and the button goes to the right end of the row */
    .region-page #eventTable .notify-button {
        margin: 0 0 0 auto;
        padding: 0.2rem 0.65rem;
    }

    .region-page #eventTable .notify-button span {
        display: inline;
    }
}

/* ---- Utility pages (Add Event, Tags): same look, black as the accent ------
   They aren't a region, so --region-c is black here and colour comes only from
   the region and tag chips. */
.region-page .region-title-center {
    width: fit-content;
    margin: 0 auto;
}

.region-page main .card {
    background: #fff;
    border: 2.5px solid var(--ink);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--ink);
}

.region-page main .card-title {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.region-page main .list-group-item {
    background: transparent;
    border-color: #dee2e6;
}

.region-page main .card a {
    color: var(--ink);
    font-weight: 600;
    text-decoration-color: var(--region-c);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.region-page main .card a:hover {
    text-decoration-thickness: 3px;
}

/* A region name shown as a coloured pill */
.region-chip {
    display: inline-block;
    margin: 0.1rem 0.1rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--c);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

/* Tags page: the lists become rows of the same chips the event table uses.
   (Without JavaScript they stay a plain list.) */
.region-page .tag-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.region-page .tag-list .tag-pill {
    width: auto;
    padding: 2px 11px;
    border: 0;
    border-radius: 1em;    /* see .tag-chip */
    text-align: center;
    text-wrap: balance;
    background: var(--chip);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
    .region-page header .btn,
    .region-page .notify-button,
    .region-page .filter-dropdown-toggle { transition: none; }
}

/* ---- Page forms (Add Event, WEBSITE-70) and the feedback dialog's messages ----
   Fields, labels and buttons share the dialog rules above (.site-form). */
.region-page main .form-title {
    margin: 0 0 14px;
    font-family: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.1;
    letter-spacing: normal;
    text-transform: none;
}

.site-form .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 16px;
}

@media (min-width: 576px) {
    .site-form .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.site-form .req {
    color: #c93631;
}

.site-form select {
    background-color: #fff;
}

.form-hint {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: #495057;
}

.form-status {
    margin-top: 16px;
    padding: 12px 14px;
    border: 2px solid #111;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.form-status.is-success {
    background: #e7f5ec;
}

.form-status.is-error {
    background: #fdecea;
}

.form-status a {
    color: #111;
    font-weight: 700;
}

.feedback-error {
    margin: 0 0 16px;
}

/* ---- Stable hover area for the sticker buttons (fixes a flickering cursor) -------
   These buttons shift a few pixels on hover or focus ("press down"). Near an edge that
   shift moves the button out from under the pointer, so hover switches off and on again
   as the pointer jitters (a trackpad always does) and the cursor icon flashes between
   arrow and link; a click can even miss, because the button moves between mouse-down
   and mouse-up. Each one gets an invisible layer that shifts the opposite way, so the
   area that was hoverable before the shift stays hoverable. */
.region-page header .btn, .feedback-form button, .site-form button, .feedback-success button, .notify-form button, .region-page .filter-dropdown-toggle, .region-page .notify-button {
    position: relative;   /* .feedback-button is already position: fixed */
}

:is(.region-page header .btn, .feedback-form button, .site-form button, .feedback-success button, .notify-form button, .region-page .filter-dropdown-toggle, .region-page .notify-button, .feedback-button)::before {
    content: '';
    position: absolute;
    inset: -3px;   /* absolute children start inside the border, so reach out over it */
    transition: transform 0.12s ease;
}

:is(.region-page header .btn, .feedback-form button, .site-form button, .feedback-success button, .notify-form button):is(:hover, :focus-visible)::before {
    transform: translate(-3px, -3px);
}

:is(.region-page .filter-dropdown-toggle, .region-page .notify-button, .feedback-button):is(:hover, :focus-visible)::before {
    transform: translate(-2px, -2px);
}

/* The "What's new" page (whats-new.html, whatsNew.js): months, then that month's entries */
.whats-new-month {
    margin-bottom: 2rem;
}

.whats-new-month-title {
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--ink, #111);
}

.whats-new-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.whats-new-item {
    padding: 0.85rem 0;
    border-bottom: 1px dashed #ced4da;
}

.whats-new-item:last-child {
    border-bottom: 0;
}

.whats-new-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.whats-new-text {
    margin: 0;
}

/* Home page: the small "What's new" link under "Add my area" */
.request-area-news {
    margin: 1.25rem 0 0;
    text-align: center;
}

/* The footer on every page (siteFooter.js): one quiet line, centred, below everything else */
.site-footer {
    max-width: 38rem;
    margin: 1.5rem auto 0;
    padding: 0 16px 4.5rem;   /* room to scroll the text clear of the round buttons fixed in the bottom corners */
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6c757d;
}
.site-footer p { margin: 0; }
