/* Maps (Leaflet, see map.js), also loaded in the admin. */

.map { display: block; width: 100%; height: min(68vh, 620px); background: #171022; border-radius: inherit; }
.map--picker { height: 380px; border-radius: 12px; }

/* The light map turned into a night map */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(0.95) contrast(0.92) saturate(0.7); }

.map-noscript { padding: 1.5rem; color: #f3ead7; }

.map-pin-wrapper { background: none; border: 0; }

.map-pin {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    padding: 5px 7px;
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, calc(-100% - 8px));
    white-space: nowrap;
    background: #120a1f;
    border: 2px solid #ff7a18;
    border-radius: 999px;
    box-shadow: 0 0 14px rgb(255 122 24 / 0.75), 0 3px 8px rgb(0 0 0 / 0.6);
    transition: box-shadow 0.15s;
}

/* The tip of the pin */
.map-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    border: solid transparent;
    border-width: 8px 6px 0;
    border-top-color: #ff7a18;
    transform: translateX(-50%);
}

.map-pin .icon { width: 22px; height: 22px; display: block; }
.map-pin-wrapper:hover .map-pin, .map-pin-wrapper:focus .map-pin { box-shadow: 0 0 22px rgb(255 122 24), 0 3px 8px rgb(0 0 0 / 0.6); }

.map-pin--picker {
    width: 26px;
    height: 26px;
    padding: 0;
    background: #ff7a18;
    border-color: #fff3d6;
    cursor: grab;
}

.map-pin--picker::after { border-top-color: #fff3d6; }

/* Popups */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: #1b1029;
    color: #f3ead7;
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(255 122 24 / 0.45);
}

.leaflet-popup-content { margin: 12px 14px; font: inherit; font-size: 0.95rem; line-height: 1.4; }
.leaflet-popup-content p { margin: 0; }
.leaflet-container a.leaflet-popup-close-button { color: #f3ead7; }

.map-popup h3 { margin: 0 0 2px; font-size: 1.05rem; color: #ffa45c; }
.map-popup .tags { margin: 8px 0; }
.map-popup-image { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.map-popup-address { color: #cfc4d8; }
.map-popup-description { margin-bottom: 8px !important; }
.map-popup-hours { font-size: 0.88rem; }

.map .tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; list-style: none; }
.map .tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; font-size: 0.78rem; background: rgb(255 255 255 / 0.08); border-radius: 999px; }
.map .tag .icon { width: 16px; height: 16px; }

/* Attribution and zoom on the dark surface */
.leaflet-container .leaflet-control-attribution { background: rgb(18 10 31 / 0.8); color: #cfc4d8; }
.leaflet-container .leaflet-control-attribution a { color: #ffa45c; }
.leaflet-bar a, .leaflet-bar a.leaflet-disabled { background: #1b1029; color: #f3ead7; border-bottom-color: #3c2a52; }
.leaflet-bar a:hover { background: #2c1a42; color: #ff7a18; }
.leaflet-touch .leaflet-bar { border-color: rgb(255 122 24 / 0.45); }
