/* Shared map controls, place previews and numbered markers. */
.map-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-ink);
    font: 500 20px/1 Geist, sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.map-button:not(:disabled):is(:hover, :focus-visible) {
    color: var(--color-action);
    background: transparent;
}
.map-button:disabled {
    color: var(--color-disabled-ink);
    cursor: default;
}
.map-button:focus-visible {
    outline: 2px solid var(--color-action);
    outline-offset: -2px;
}
.map-button-with-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    min-height: 40px;
    padding: 6px 8px;
    border-radius: 999px;
    font: 500 14px/1.2 Geist, sans-serif;
    text-align: center;
}
.map-button[hidden] { display: none; }
[data-map-icon] {
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    background: currentColor;
    mask: var(--map-icon) center / contain no-repeat;
}
[data-map-icon="expand"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M14%205h5v5m0-5-6%206M10%2019H5v-5m0%205%206-6%22/%3E%3C/svg%3E"); }
[data-map-icon="fit"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M8%204H4v4m12-4h4v4m0%208v4h-4m-8%200H4v-4m10-4a2%202%200%201%201-4%200%202%202%200%201%201%204%200Z%22/%3E%3C/svg%3E"); }
[data-map-icon="search"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M16%2010a6%206%200%201%201-12%200%206%206%200%201%201%2012%200Zm-1.75%204.25L20%2020%22/%3E%3C/svg%3E"); }
[data-map-icon="share-location"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M12%2021s6-5.4%206-11a6%206%200%201%200-12%200c0%205.6%206%2011%206%2011Zm2-11a2%202%200%201%201-4%200%202%202%200%201%201%204%200Z%22/%3E%3C/svg%3E"); }
[data-map-icon="pause"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M9%205v14m6-14v14%22/%3E%3C/svg%3E"); }
[data-map-icon="play"] { --map-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22black%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M8%205l11%207-11%207V5Z%22/%3E%3C/svg%3E"); }
.map-button-over-map {
    background: var(--app-color-maps-000000,#000);
    color: var(--app-color-maps-ffffff,#fff);
}
.map-button.map-button-over-map:is(:hover, :focus-visible) { background: var(--app-color-maps-000000,#000); color: var(--app-color-maps-ffffff,#fff); }
.map-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}
.map-navigation .map-button { font-size: 24px; }
.map-navigation [data-map-icon] { width: 24px; height: 24px; }
.map-close.ui-close:focus-visible {
    outline: none !important;
    border-color: var(--color-action) !important;
    box-shadow: inset 0 0 0 1px var(--color-action) !important;
}
.map-preview-actions { display: flex; }
.map-preview-actions .map-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 32px;
    padding-inline: 10px;
    border-radius: 999px;
    font-size: 13px;
}

.map-preview-bubble .leaflet-popup-content-wrapper {
    border-radius: 14px;
    background: var(--color-paper);
    color: var(--color-ink);
}
.map-preview-bubble .leaflet-popup-tip { background: var(--color-paper); }
.map-preview-bubble .leaflet-popup-content { margin: 8px; }

.pm-popup {
    width: min(220px, calc(100vw - 64px));
    max-height: 268px;
    overflow: auto;
    font-family: Geist, sans-serif;
}
.map-preview-card {
    display: grid;
    gap: 4px;
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-ink);
    font: inherit;
    text-align: start;
    overflow-wrap: anywhere;
}
button.map-preview-card { cursor: pointer; }
button.map-preview-card:is(:hover, :focus-visible) { background: var(--color-neutral); }
button.map-preview-card:focus-visible { outline: 2px solid var(--color-action); outline-offset: -2px; }
.map-preview-name { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.25; }
.map-preview-meta { margin: 0; font-size: 12px; line-height: 1.3; color: var(--color-muted); }

.map-preview-card .map-photo-pin-preview {
    position: static;
    display: block;
    width: auto;
    height: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    pointer-events: none;
}
.map-preview-card .map-photo-pin-preview img {
    width: 100% !important;
    height: 80px !important;
    border-radius: inherit;
    object-fit: cover;
}

.pm-cluster {
    --map-cluster-size: 38px;
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: var(--map-cluster-size);
    height: var(--map-cluster-size);
    border: 3px solid var(--app-color-maps-ffffff,#fff);
    border-radius: 50%;
    background: var(--color-action);
    color: var(--app-color-maps-ffffff,#fff);
    box-shadow: 0 2px 9px var(--app-color-maps-00000033,#0003);
    font: 600 14px/1 Geist, sans-serif;
}
.pm-people-cluster { background: var(--app-color-maps-008240,#008240); }
