/*
 * The Whereabouts — Section 7.17 frontend repair layer.
 * Mobile rules deliberately come first in design intent and use the actual
 * theme selectors rather than generic menu guesses.
 */

:root {
    --wa717-ink: #111113;
    --wa717-coral: #f4473d;
    --wa717-coral-dark: #d9342b;
    --wa717-paper: #f7f4ef;
    --wa717-line: #ddd6ce;
    --wa717-muted: #77716b;
}

/* Never allow Select2's original multiple-select element to reappear as a
 * second blue list below the styled input. */
body.wa717-listing-form-page select.select2-hidden-accessible,
body.wa717-listing-form-page .select2-hidden-accessible,
body.wa716-event-studio-page select.select2-hidden-accessible,
body.wa716-event-studio-page .select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    white-space: nowrap !important;
}

/* Select2 places the open results panel directly under <body>. Scope through
 * the page body rather than through the form so every blue default is removed. */
body.wa717-listing-form-page .select2-dropdown,
body.wa716-event-studio-page .select2-dropdown {
    margin-top: -1px !important;
    overflow: hidden !important;
    border: 1px solid var(--wa717-line) !important;
    border-top-color: var(--wa717-line) !important;
    border-radius: 0 0 8px 8px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(17, 17, 19, 0.12) !important;
}

body.wa717-listing-form-page .select2-results__options,
body.wa716-event-studio-page .select2-results__options {
    background: #fff !important;
}

body.wa717-listing-form-page .select2-results__group,
body.wa716-event-studio-page .select2-results__group {
    padding: 8px 10px 6px !important;
    background: var(--wa717-paper) !important;
    color: var(--wa717-ink) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

body.wa717-listing-form-page .select2-results__option,
body.wa716-event-studio-page .select2-results__option {
    padding: 8px 11px !important;
    background: #fff !important;
    color: var(--wa717-ink) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

body.wa717-listing-form-page .select2-results__option[aria-selected="true"],
body.wa716-event-studio-page .select2-results__option[aria-selected="true"] {
    background: #f2ede7 !important;
    color: var(--wa717-ink) !important;
}

body.wa717-listing-form-page .select2-results__option--highlighted[aria-selected],
body.wa716-event-studio-page .select2-results__option--highlighted[aria-selected] {
    background: var(--wa717-coral) !important;
    color: #fff !important;
}

body.wa717-listing-form-page .select2-container--open .select2-selection,
body.wa716-event-studio-page .select2-container--open .select2-selection {
    border-color: var(--wa717-coral) !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 0 0 3px rgba(244, 71, 61, 0.12) !important;
}

/* Generic no-key map editor. The GeoDirectory/Google row stays in the DOM for
 * compatibility but is never visible or interactive. */
body.wa717-listing-form-page .wa717-native-map-hidden,
body.wa717-listing-form-page #geodir_address_map_row,
body.wa717-listing-form-page [id^="geodir_"][id$="_map_row"],
body.wa717-listing-form-page [data-argument="address_map"],
body.wa717-listing-form-page [data-argument$="_mapview"],
body.wa717-listing-form-page [id$="_mapview_row"] {
    display: none !important;
}

.wa717-map-card {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid var(--wa717-line);
    border-radius: 12px;
    background: #fbfaf8;
    box-sizing: border-box;
}

.wa717-address-suggestions {
    position: relative;
    z-index: 30;
    width: 100%;
    margin: 6px 0 2px;
}

.wa717-address-suggestions[hidden] {
    display: none !important;
}

.wa717-address-suggestion-list {
    overflow: hidden;
    border: 1px solid var(--wa717-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(17, 17, 19, 0.12);
}

.wa717-address-suggestion {
    display: block;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 10px 13px;
    border: 0;
    border-bottom: 1px solid #eee8e1;
    border-radius: 0;
    background: #fff;
    color: var(--wa717-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.wa717-address-suggestion:hover,
.wa717-address-suggestion:focus-visible {
    background: #fff1ef;
    color: var(--wa717-ink);
    outline: 2px solid var(--wa717-coral);
    outline-offset: -2px;
}

.wa717-address-suggestion strong,
.wa717-address-suggestion small {
    display: block;
}

.wa717-address-suggestion strong {
    color: var(--wa717-ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.wa717-address-suggestion small {
    margin-top: 3px;
    color: var(--wa717-muted);
    font-size: 10px;
    line-height: 1.4;
}

.wa717-address-credit {
    padding: 7px 12px;
    background: #fbfaf8;
    color: var(--wa717-muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.35;
}

.wa717-map-card__head {
    margin: 0 0 13px;
    padding: 0 0 11px;
    border-bottom: 1px solid #eee8e1;
}

.wa717-map-card__head strong,
.wa717-map-card__head span {
    display: block;
}

.wa717-map-card__head strong {
    margin: 0 0 4px;
    color: var(--wa717-ink);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
}

.wa717-map-card__head span {
    color: var(--wa717-muted);
    font-size: 10px;
    line-height: 1.5;
}

.wa717-map-canvas {
    width: 100%;
    height: 360px;
    min-height: 300px;
    overflow: hidden;
    border: 1px solid #cfc6bd;
    border-radius: 10px;
    background: #ece8e2;
    z-index: 1;
}

.wa717-map-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.wa717-map-button {
    appearance: none;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--wa717-coral);
    border-radius: 8px;
    background: var(--wa717-coral);
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    cursor: pointer;
}

.wa717-map-button:hover,
.wa717-map-button:focus-visible {
    border-color: var(--wa717-coral-dark);
    background: var(--wa717-coral-dark);
    outline: none;
}

.wa717-map-button[disabled] {
    opacity: 0.58;
    cursor: wait;
}

.wa717-map-status {
    color: var(--wa717-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    text-align: right;
}

.wa717-map-status[data-state="success"] { color: #257a4a; }
.wa717-map-status[data-state="error"] { color: #b42318; }

.wa717-map-fallback-visible {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    opacity: 1 !important;
}

/* A server-suppressed event logo never reserves space. */
.wa717-event-logo-server-suppressed {
    display: none !important;
}

/* One full-width hero image is more useful on a phone than a two-column mosaic
 * with an empty or failed secondary image. The gallery remains available below. */
@media (max-width: 800px) {
    .wa-single-hero__gallery {
        display: block !important;
        width: 100% !important;
        height: clamp(220px, 62vw, 310px) !important;
        min-height: 220px !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    .wa-single-hero__gallery > .wa-single-hero__shot,
    .wa-single-hero__gallery .wa-single-hero__shot {
        display: none !important;
    }

    .wa-single-hero__gallery > .wa-single-hero__shot:first-child,
    .wa-single-hero__gallery .wa-single-hero__shot:first-child {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        grid-column: 1 / -1 !important;
        grid-row: 1 / -1 !important;
    }

    .wa-single-hero__gallery .wa-single-hero__shot:first-child img,
    .wa-single-hero__gallery .wa-single-hero__shot:first-child picture,
    .wa-single-hero__gallery .wa-single-hero__shot:first-child picture img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    /* Actual Whereabouts drawer markup. */
    .wa-mobile-nav > a,
    .wa-mobile-community > summary {
        min-height: 0 !important;
        padding: 9px 0 !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.22 !important;
    }

    .wa-mobile-community__links {
        gap: 0 !important;
        margin-top: 2px !important;
    }

    .wa-mobile-community__links > a {
        min-height: 0 !important;
        padding: 7px 0 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1.22 !important;
    }

    .wa-mobile-community__links > a strong {
        font-size: 11px !important;
        font-weight: 800 !important;
        line-height: 1.22 !important;
    }

    .wa-mobile-community__links > a small {
        margin-left: 3px !important;
        font-size: 8.5px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
    }

    .wa-mobile-drawer .wa-mobile-actions a,
    .wa-mobile-drawer .wa-mobile-cta,
    .wa-mobile-drawer .button {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .wa717-map-card {
        padding: 12px;
    }

    .wa717-map-canvas {
        height: 285px;
        min-height: 260px;
    }

    .wa717-map-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .wa717-map-button {
        width: 100%;
    }

    .wa717-map-status {
        text-align: left;
    }
}
