.event-map {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid rgba(20, 97, 162, 0.2);
    border-radius: 18px;
    background: #e8edf1;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.event-map:active { cursor: grabbing; }
.event-map:focus-visible { outline: 3px solid rgba(20, 97, 162, 0.3); outline-offset: 2px; }
.event-map__tiles, .event-map__markers { position: absolute; inset: 0; }
.event-map__tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.event-map__markers { pointer-events: none; }
.event-map__marker,
.event-map__selected-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #e85b0d;
    box-shadow: 0 3px 12px rgba(12, 27, 45, 0.32);
    pointer-events: auto;
    transform: translate(-50%, -100%) rotate(-45deg);
}

.event-map__marker::after,
.event-map__selected-marker::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #fff;
}

.event-map__marker--cluster {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    transform: translate(-50%, -50%);
}
.event-map__marker--cluster::after { display: none; }
.event-map__marker--cluster { font-size: 0.8rem; }
.event-map__marker.is-cancelled { background: #8e2f2f; }
.event-map__selected-marker { width: 38px; height: 38px; background: #1461a2; pointer-events: none; z-index: 3; }
.event-map__controls { position: absolute; top: 12px; left: 12px; display: grid; z-index: 4; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.event-map__controls button { width: 38px; height: 38px; border: 0; border-bottom: 1px solid #d8dfe6; background: #fff; color: #1b2740; font: 700 1.3rem/1 sans-serif; }
.event-map__controls button:first-child { border-radius: 9px 9px 0 0; }
.event-map__controls button:last-child { border-bottom: 0; border-radius: 0 0 9px 9px; }
.event-map__attribution { position: absolute; right: 5px; bottom: 4px; z-index: 4; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.88); color: #334155; font-size: 10px; text-decoration: none; }

.events-location-picker { display: grid; gap: .75rem; padding: 1rem; border: 1px solid rgba(38,24,21,.12); border-radius: 16px; background: rgba(38,24,21,.025); }
.events-location-picker__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.events-location-picker__head h3, .events-location-picker__head p, .events-location-picker__status { margin: 0; }
.events-location-picker__head p, .events-location-picker__status { color: #6c5954; }
.events-location-picker__status { font-size: .88rem; }
.events-location-picker__search { display: grid; gap: .4rem; }
.events-location-picker__search > label { color: #2e2522; font-size: .86rem; font-weight: 750; }
.events-location-picker__search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
.events-location-picker__search-row input {
    min-width: 0;
    min-height: 44px;
    padding: .65rem .8rem;
    border: 1px solid rgba(38,24,21,.18);
    border-radius: 11px;
    background: #fff;
    color: #241b19;
    font: inherit;
}
.events-location-picker__search-row button { min-height: 44px; white-space: nowrap; }
.events-location-picker__search-status { min-height: 1.2em; margin: 0; color: #6c5954; font-size: .84rem; }
.events-location-picker__search-status.is-error { color: #a1261d; }
.events-location-picker__results {
    display: grid;
    gap: .35rem;
    max-height: 260px;
    padding: .35rem;
    overflow-y: auto;
    border: 1px solid rgba(20,97,162,.16);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16,32,55,.09);
}
.events-location-picker__results[hidden] { display: none; }
.events-location-picker__result {
    width: 100%;
    padding: .65rem .75rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #26201e;
    font: inherit;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}
.events-location-picker__result:hover,
.events-location-picker__result:focus-visible { background: rgba(20,97,162,.09); outline: none; }
.events-location-picker--admin { margin: 12px 0; padding: 14px; }
.events-location-picker--admin .event-map { min-height: 340px; }

.events-map-panel { display: grid; gap: 1rem; }
.events-map-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(190px, .45fr) auto; align-items: end; gap: .75rem; }
.events-map-toolbar label { display: grid; gap: .35rem; color: var(--events-ink); font-size: .82rem; font-weight: 700; }
.events-map-toolbar input, .events-map-toolbar select { width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid rgba(38,24,21,.16); border-radius: 12px; background: #fff; }
.event-map--public { min-height: min(68vh, 720px); }
.events-map-footer { display: flex; justify-content: space-between; gap: 1rem; }
.events-map-footer p { margin: 0; font-weight: 650; }
.events-map-selection { position: absolute; right: 2rem; bottom: 4rem; z-index: 6; width: min(430px, calc(100% - 4rem)); max-height: min(540px, calc(100% - 7rem)); padding: 1.1rem; overflow: hidden; border: 1px solid rgba(20,97,162,.18); border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 18px 44px rgba(16,32,55,.22); color: var(--events-ink); }
.events-map-selection[hidden] { display: none; }
.events-map-selection__close { position: absolute; top: .75rem; right: .75rem; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid rgba(38,24,21,.13); border-radius: 50%; background: #fff; color: #392e2a; font: 600 1.35rem/1 sans-serif; cursor: pointer; z-index: 1; }
.events-map-selection__close:hover,
.events-map-selection__close:focus-visible { border-color: rgba(232,91,13,.45); background: #fff4ec; color: #bd4300; outline: none; }
.events-map-selection > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.events-map-selection h2 { margin: .65rem 2.5rem .35rem 0; font-size: 1.2rem; line-height: 1.25; }
.events-map-selection p { margin: .2rem 0; color: var(--events-muted); }
.events-map-selection .btn { margin-top: .75rem; }
.events-map-selection__heading { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .75rem !important; padding-right: 2.5rem; }
.events-map-selection__heading h2 { margin: 0; }
.events-map-selection__heading p { margin-top: .2rem; font-size: .86rem; }
.events-map-selection__count { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: #e85b0d; color: #fff; font-size: 1.05rem; font-weight: 850; }
.events-map-selection__list { display: grid; gap: .55rem; max-height: min(390px, calc(100vh - 280px)); margin: .85rem -.25rem -.2rem 0; padding: 0 .35rem .2rem 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; }
.events-map-selection__list li { min-width: 0; }
.events-map-selection__card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .7rem; min-height: 92px; padding: .55rem; border: 1px solid rgba(38,24,21,.1); border-radius: 12px; background: #fffaf6; color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.events-map-selection__card:hover,
.events-map-selection__card:focus-visible { border-color: rgba(232,91,13,.38); background: #fff5ed; color: inherit; outline: none; transform: translateY(-1px); }
.events-map-selection__image { width: 76px; height: 80px; border-radius: 9px; object-fit: cover; background: #eee8e2; }
.events-map-selection__content { display: grid; align-content: center; gap: .32rem; min-width: 0; }
.events-map-selection__title { color: var(--events-ink) !important; font-weight: 780 !important; line-height: 1.28; text-decoration: none; }
.events-map-selection__card:hover .events-map-selection__title { color: var(--jelonka-brand) !important; }
.events-map-selection__badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.events-map-selection__meta { display: flex !important; flex-wrap: wrap; gap: .25rem .8rem !important; color: var(--events-muted); font-size: .82rem; }
.events-map-selection__meta span { color: inherit; font-size: inherit; }
.events-map-selection__date::before { content: "◷"; margin-right: .28rem; color: #e85b0d; }
.events-map-selection__location::before { content: "⌖"; margin-right: .28rem; color: #e85b0d; }
.events-map-selection__featured-image { display: block; width: 100%; max-height: 190px; margin: .75rem 0; border-radius: 12px; object-fit: cover; background: #eee8e2; }
.events-map-panel { position: relative; }
@media (max-width: 767.98px) {
    .events-map-toolbar { grid-template-columns: 1fr; }
    .event-map--public { min-height: 58vh; }
    .event-map--picker { min-height: 320px; }
    .events-map-selection { right: .75rem; bottom: 3.5rem; width: calc(100% - 1.5rem); max-height: min(62vh, 500px); padding: .9rem; border-radius: 15px; }
    .events-map-selection__list { max-height: min(42vh, 340px); }
    .events-map-selection__card { grid-template-columns: 64px minmax(0, 1fr); min-height: 78px; }
    .events-map-selection__image { width: 64px; height: 68px; }
    .events-location-picker__head, .events-map-footer { display: grid; }
    .events-location-picker__search-row { grid-template-columns: 1fr; }
    .events-location-picker__search-row button { width: 100%; }
}
