/*
 * Shared look of Superroute's own sMap pages (loaded by resources/views/partials/smap.blade.php).
 *
 * A popup whose content is a .custom-popup card (route map, dispatcher, map designer, …) draws its own frame:
 * a coloured .popup-header and a .popup-content with its own padding. On Leaflet the pages took the padding off
 * .leaflet-popup-content-wrapper; under sMap the SDK's frame (13px 24px in the classic look) would show as a white
 * ring around the card, so it takes no padding here and the card is the popup.
 */
.smap-popup.custom-popup,
.smap-popup:has(> .maplibregl-popup-content > .custom-popup),
.smap-popup:has(> .maplibregl-popup-content > * > .custom-popup) {
    --smap-popup-padding: 0;
    --smap-popup-radius: 8px;
}

.smap-popup.custom-popup > .maplibregl-popup-content,
.smap-popup:has(> .maplibregl-popup-content > .custom-popup) > .maplibregl-popup-content,
.smap-popup:has(> .maplibregl-popup-content > * > .custom-popup) > .maplibregl-popup-content {
    overflow: hidden;
}

/* The card is the popup: its own shadow and radius would draw a second edge inside the frame. */
.smap-popup .maplibregl-popup-content > .custom-popup,
.smap-popup .maplibregl-popup-content > * > .custom-popup {
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

/* The close button sits on the card's coloured header. */
.smap-popup:has(> .maplibregl-popup-content > .custom-popup > .popup-header:first-child) .maplibregl-popup-close-button,
.smap-popup:has(> .maplibregl-popup-content > * > .custom-popup > .popup-header:first-child) .maplibregl-popup-close-button {
    color: #ffffff;
    z-index: 1;
}
