/* Ticketing and the discovery map.
 *
 * Theme-agnostic on purpose. The app ships three themes (magazine -- the
 * default -- otter and pebble) chosen by the mm_theme cookie, and only two of
 * them define --accent-sun. Putting these rules in one theme file meant the
 * map had no height and the ticket badge no colour for everybody on the
 * default theme, with nothing in the console to say so.
 *
 * Loaded after the theme stylesheet, so a theme can still override any of it.
 */

:root {
    /* One ticketing colour, used by the card badge, the Book button, the
       Bookable filter pill and the map pin. Falls back for themes without
       --accent-sun. */
    --mm-ticket: var(--accent-sun, #E59500);
    --mm-ticket-contrast: #ffffff;
}

/* --- Card badge --------------------------------------------------------- */
/* Takes the prime top-left slot and pushes duration below it; hence it
   precedes .badge-duration in the DOM. */
.badge-tickets {
    top: 8px;
    left: 8px;
    background: var(--mm-ticket);
    color: var(--mm-ticket-contrast);
}

.badge-tickets ~ .badge-duration {
    top: 38px;
}

/* --- Book button -------------------------------------------------------- */
.btn-book {
    background: var(--mm-ticket);
    color: var(--mm-ticket-contrast);
    box-shadow: 0 4px 12px rgba(229, 149, 0, 0.3);
}

.btn-book:active {
    transform: scale(0.98);
}

.btn-book .price-from {
    font-weight: 500;
    opacity: 0.9;
}

/* --- Bookable filter pill ----------------------------------------------- */
.filter-pill-book {
    color: var(--mm-ticket);
    border-color: var(--mm-ticket);
    background: rgba(229, 149, 0, 0.08);
}

.filter-pill-book.active {
    background: var(--mm-ticket);
    border-color: var(--mm-ticket);
    color: var(--mm-ticket-contrast);
}

/* --- Map pin ------------------------------------------------------------ */
.pin-bubble {
    position: relative;
}

.pin-ticket {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--mm-ticket);
    border: 2px solid #fff;
    box-sizing: border-box;
}

/* --- Discovery map ------------------------------------------------------ */
.discovery-map-panel {
    margin: 0 16px 16px;
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* An explicit height is load-bearing: Leaflet binds happily to a zero-height
   container and reports success, so a missing height looks like "no map"
   rather than an error. */
.discovery-map {
    height: 220px;
    width: 100%;
    background: var(--pebble-stone, #f1f1f1);
}

@media (min-width: 768px) {
    .discovery-map {
        height: 320px;
    }
}
