.where-page {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.where-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    color: #fff;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #8f1118, #d9232e 62%, #ff5a36);
    box-shadow: 0 1.25rem 2.5rem rgb(85 10 15 / 18%);
}

.where-hero h1,
.where-hero .lead,
.where-hero .eyebrow {
    color: inherit;
}

.where-hero h1 {
    margin: .2rem 0 .5rem;
    font-size: clamp(2.2rem, 7vw, 4.6rem);
    line-height: .98;
}

.where-hero .lead {
    max-width: 46rem;
    margin: 0;
}

.where-hero-mark {
    display: grid;
    width: 9.5rem;
    aspect-ratio: 1;
    place-content: center;
    text-align: center;
    border: 2px solid rgb(255 255 255 / 55%);
    border-radius: 50%;
    background: rgb(0 0 0 / 14%);
}

.where-hero-mark span {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.where-hero-mark small {
    max-width: 7rem;
    margin-top: .3rem;
}

.where-toolbar,
.where-calendar-heading,
.where-authorised-bar {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.where-toolbar {
    margin-bottom: 1.5rem;
    padding: .65rem;
    border: 1px solid #dfe3e8;
    border-radius: 1rem;
    background: #fff;
}

.where-toolbar .button {
    margin-left: auto;
}

.where-view-button.is-active {
    color: #fff;
    border-color: #17191d;
    background: #17191d;
}

.where-view {
    margin-bottom: 2rem;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid #dfe3e8;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 .75rem 2rem rgb(20 25 30 / 6%);
}

.where-calendar-heading {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.where-calendar-heading h2 {
    margin: 0;
    text-align: center;
    text-transform: capitalize;
}

.where-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .5rem;
}

.where-calendar-weekday {
    padding: .4rem;
    color: #616875;
    font-size: .86rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.where-calendar-empty {
    min-height: 7.5rem;
}

.where-calendar-day {
    min-height: 7.5rem;
    padding: .55rem;
    overflow: hidden;
    border: 1px solid #dfe3e8;
    border-radius: .75rem;
    background: #fafbfc;
}

.where-calendar-day.is-today {
    border: 2px solid #d9232e;
}

.where-calendar-day-number {
    display: inline-grid;
    min-width: 2rem;
    min-height: 2rem;
    margin-bottom: .35rem;
    place-content: center;
    font-weight: 800;
}

.where-calendar-day.is-today .where-calendar-day-number {
    color: #fff;
    border-radius: 50%;
    background: #d9232e;
}

.where-calendar-events {
    display: grid;
    gap: .3rem;
}

.where-calendar-event {
    width: 100%;
    min-height: 2.5rem;
    padding: .4rem .5rem;
    color: #fff;
    font-size: .82rem;
    line-height: 1.2;
    text-align: left;
    border: 0;
    border-radius: .55rem;
    background: #9f1720;
}

.where-calendar-event:hover,
.where-calendar-event:focus-visible {
    background: #6f0f15;
}

.where-calendar-event span {
    display: block;
    opacity: .85;
    font-size: .74rem;
}

.where-calendar-event-count {
    min-height: 3.25rem;
    color: #20242a !important;
    border: 2px solid #d9232e;
    background: #fff !important;
    font-weight: 800;
    text-align: center;
}

.where-calendar-event-count:hover,
.where-calendar-event-count:focus-visible {
    color: #fff !important;
    background: #9f1720 !important;
}

.where-calendar-month-empty {
    grid-column: 1 / -1;
    margin: .5rem 0 0;
    padding: 1rem;
    text-align: center;
    border-radius: .75rem;
    background: #f1f3f5;
}

.where-map,
.where-location-map,
.where-dialog-map {
    z-index: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: clamp(20rem, 50vh, 32rem);
    min-height: 20rem;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #cad0d8;
    border-radius: 1rem;
    background: #edf0f2;
}

.academy-map-marker-shell {
    border: 0;
    background: transparent;
}

.academy-map-marker {
    position: relative;
    display: block;
    width: 2rem;
    height: 2rem;
    transform: rotate(-45deg);
    border: .22rem solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #d9232e;
    box-shadow: 0 .2rem .65rem rgb(0 0 0 / 55%);
}

.academy-map-marker::after {
    position: absolute;
    inset: .48rem;
    content: '';
    border-radius: 50%;
    background: #fff;
}

.where-location-map {
    height: clamp(16rem, 40vh, 24rem);
    min-height: 16rem;
    margin-top: 1rem;
}

.where-dialog-map {
    height: clamp(18rem, 52vh, 30rem);
    min-height: 18rem;
    margin-top: 1.5rem;
}

.where-event-list {
    display: grid;
    gap: .8rem;
}

.where-event-groups,
.where-municipality-list {
    display: grid;
    gap: 1rem;
}

.where-county-group {
    padding: 1rem;
    border: 1px solid #d7dce2;
    border-radius: 1rem;
    background: #f5f6f8;
}

.where-county-group > h3,
.where-municipality-group > h4 {
    margin: 0 0 .8rem;
}

.where-county-group > h3 {
    font-size: 1.4rem;
}

.where-county-group > h3 span,
.where-municipality-group > h4 span {
    display: block;
    margin-bottom: .12rem;
    color: #656c76;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.where-municipality-group {
    padding: 1rem;
    border-left: .25rem solid #8f1118;
    border-radius: .75rem;
    background: #fff;
}

.where-municipality-group > h4 {
    color: #20242a;
    font-size: 1.12rem;
}

.where-event-card {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dfe3e8;
    border-left: .4rem solid #d9232e;
    border-radius: .85rem;
    background: #fff;
}

.where-event-card time,
.where-event-card time span {
    display: block;
}

.where-event-card h3,
.where-event-card h5,
.where-event-card p {
    margin: 0;
}

.where-event-card h5 {
    color: #20242a;
    font-size: 1.08rem;
}

.where-event-card p {
    margin-top: .2rem;
    color: #59616d;
}

.where-empty {
    padding: 2rem;
    text-align: center;
}

.where-dialog {
    width: min(42rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: auto;
    color: #20242a;
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 2rem 6rem rgb(0 0 0 / 38%);
}

.where-dialog::backdrop {
    background: rgb(12 15 18 / 72%);
    backdrop-filter: blur(3px);
}

.where-dialog > * {
    margin-inline: clamp(1.25rem, 4vw, 2rem);
}

.where-dialog-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin: 0;
    padding: 1.5rem clamp(1.25rem, 4vw, 2rem);
    color: #fff;
    background: linear-gradient(135deg, #8f1118, #d9232e);
}

.where-dialog-heading h2,
.where-dialog-heading .eyebrow {
    margin: 0;
    color: inherit;
}

.where-dialog-unit {
    margin: .45rem 0 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
}

.where-dialog-close {
    min-width: 3rem;
    min-height: 3rem;
    padding: 0;
    color: #fff;
    border-color: rgb(255 255 255 / 60%);
    font-size: 2rem;
    line-height: 1;
}

.where-event-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
}

.where-event-details div {
    padding: .85rem;
    border-radius: .7rem;
    background: #f1f3f5;
}

.where-event-details dt {
    margin-bottom: .2rem;
    color: #616875;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.where-event-details dd {
    margin: 0;
    color: #20242a;
    font-weight: 700;
}

.where-dialog > .actions {
    padding-bottom: 1.5rem;
}

.where-day-dialog-intro,
.where-day-event-list {
    margin-top: 1.25rem;
}

.where-day-event-list .where-event-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

.where-day-event-list .where-event-card h3,
.where-day-event-list .where-event-card p {
    margin: 0;
}

.where-add-page {
    max-width: 58rem;
}

.where-unlock-form,
.where-event-form {
    margin: 1.5rem 0;
}

.where-authorised-bar {
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    color: #155b35;
    border: 1px solid #8bcbaa;
    border-radius: .85rem;
    background: #eefaf3;
}

.where-form-section {
    margin-bottom: 1rem;
    padding: clamp(1rem, 3vw, 1.75rem);
    border: 1px solid #dfe3e8;
    border-radius: 1rem;
    background: #fff;
}

.where-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.where-form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.geocode-status:not(:empty),
.selected-coordinate {
    margin: .75rem 0;
    padding: .75rem;
    border-radius: .65rem;
    background: #f1f3f5;
}

.geocode-status.is-error {
    color: #7a1218;
    background: #fff0f1;
}

.geocode-results {
    display: grid;
    gap: .5rem;
    margin-bottom: .75rem;
}

.geocode-result {
    width: 100%;
    min-height: 3.5rem;
    padding: .75rem 1rem;
    color: #20242a !important;
    text-align: left;
    border: 1px solid #b9c0c9;
    border-radius: .7rem;
    background: #fff;
}

.geocode-result:hover,
.geocode-result:focus-visible {
    color: #111 !important;
    border-color: #d9232e;
    background: #fff7f7;
}

@media (max-width: 760px) {
    .where-page {
        width: min(100% - 1rem, 1120px);
    }

    .where-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
        border-radius: 1rem;
    }

    .where-hero-mark {
        width: auto;
        aspect-ratio: auto;
        padding: .8rem 1rem;
        border-radius: .8rem;
    }

    .where-hero-mark span {
        font-size: 2rem;
    }

    .where-hero-mark small {
        max-width: none;
    }

    .where-toolbar > * {
        flex: 1 1 8rem;
        margin-left: 0 !important;
        text-align: center;
    }

    .where-calendar {
        display: block;
    }

    .where-calendar-weekday,
    .where-calendar-empty,
    .where-calendar-day:not(.has-events) {
        display: none;
    }

    .where-calendar-day {
        display: grid;
        grid-template-columns: 4.5rem minmax(0, 1fr);
        min-height: 0;
        margin-bottom: .65rem;
        padding: .8rem;
    }

    .where-calendar-day-number::after {
        content: attr(data-weekday);
        display: block;
        color: #616875;
        font-size: .7rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .where-calendar-events {
        min-width: 0;
    }

    .where-calendar-event {
        min-height: 3.25rem;
        font-size: 1rem;
    }

    .where-event-card {
        grid-template-columns: 1fr;
    }

    .where-county-group,
    .where-municipality-group {
        padding: .75rem;
    }

    .where-event-card button {
        width: 100%;
    }

    .where-form-grid,
    .where-form-grid-three,
    .where-event-details {
        grid-template-columns: 1fr;
    }

    .where-map,
    .where-location-map {
        height: 20rem;
        min-height: 20rem;
    }

    .where-location-map {
        height: 17rem;
        min-height: 17rem;
    }
}

@media (max-width: 430px) {
    .where-calendar-heading h2 {
        flex-basis: 100%;
        order: -1;
    }

    .where-calendar-heading button {
        flex: 1 1 auto;
    }

    .where-dialog > .actions,
    .where-dialog > .actions form,
    .where-dialog > .actions .button,
    .where-dialog > .actions button {
        width: 100%;
    }
}
