/* =====================================================================
   Bientôt — the real map (map.js): the pin, "me", the small Home map, the venue map, Leaflet tweaks.
   ===================================================================== */

/* ---------- the pin: a dot over a coral chevron; the chevron's tip is the spot ---------- */
.bt-pin {
    background: none;
    border: 0;
}

.bt-pin svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .28));
    transform-origin: 50% 100%;      /* grows from its tip, so the spot never moves */
    transition: transform .2s var(--ease);
}

/* the pin IS the logo (Logo() in brand.js): its dot is ink on the light map and white on the dark one,
   from the brand tokens in brand.css */

.bt-pin.selected svg {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}

.leaflet-marker-icon.bt-pin:active svg {
    transform: scale(.92);
}

/* ---------- me ---------- */
.bt-me span {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #2f7cf6;
    box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(0, 0, 0, .35);
}

.bt-me span::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(47, 124, 246, .22);
    animation: me-pulse 2s ease-out infinite;
}

@keyframes me-pulse {
    from { transform: scale(.5); opacity: 1; }
    to { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bt-me span::after { animation: none; }
    .bt-pin svg { transition: none; }
}

/* ---------- Leaflet in the v3 look ---------- */
.leaflet-container {
    font-family: var(--font);
    background: var(--fill);
}

html[data-theme="dark"] .leaflet-container {
    background: #1b1f2e;
}

.leaflet-control-attribution {
    font-size: 9px;
    line-height: 1.3;
    padding: 1px 5px !important;
    background: rgba(255, 255, 255, .7) !important;
    border-radius: 6px 0 0 0;
}

.leaflet-control-attribution a {
    color: inherit !important;
}

html[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(20, 24, 46, .7) !important;
    color: #c9cde0;
}

/* ---------- the small map on Home ---------- */
.map-preview {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.map-preview-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;        /* the whole card is one button: it opens the map page */
}

.map-preview .map-preview-label {
    z-index: 500;
}

.location-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.location-chip .ic {
    width: 16px;
    height: 16px;
}

/* ---------- the map page ---------- */
.fullmap-canvas {
    z-index: 1;
    cursor: auto;
    touch-action: auto;
}

.fullmap-top {
    z-index: 600;
}

.fullmap-bottom-sheet {
    z-index: 700;
}

/* ---------- the venue on the event page ---------- */
.ev-minimap {
    display: block;
    width: 100%;
    height: 150px;
    margin-top: 10px;
    padding: 0;
    border: 0;
    border-radius: var(--r-card);
    overflow: hidden;
    position: relative;
    z-index: 0;
    background: var(--fill);
}

.ev-minimap .leaflet-container,
.ev-minimap .leaflet-pane {
    pointer-events: none;
}

/* dark theme on a provider without a dark style (MAP_TILES.darkFilter): darken the light tiles */
html[data-theme="dark"] .bt-tiles-filter {
    filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7);
}
