/* Shared map controls. The map remains visible between individual buttons. */
:root{--map-selected:var(--agenda-teula,#973c31)}
body:is(.mobile-map-open,.desktop-map-open) :is(#mobile-calendar-toggle,#map-nadal-toggle){background:#fff9ef;color:var(--map-selected);border:1px solid #c9a984}
body:is(.mobile-map-open,.desktop-map-open) #mobile-calendar-toggle img{filter:brightness(0);opacity:.8}
body:is(.mobile-map-open,.desktop-map-open) #mobile-calendar-toggle:is([aria-expanded=true],[aria-pressed=true]) img{filter:brightness(0) invert(1);opacity:1}
body :is(#mobile-map-filter-visibility,#mobile-season-map-controls,#mobile-search-tab,#mobile-map-search-trigger,#map-nadal-toggle,#mobile-calendar-toggle):is([aria-expanded=true],[aria-pressed=true]),
body #mobile-map-tools button:is(.is-applied,[aria-expanded=true]),
body #season-filter-panel .season-filter-chips button:is(.is-applied,[aria-expanded=true]),
body #season-filter-panel .season-filter-options button[aria-pressed=true],
body .season-filter-nadal button[aria-pressed=true],
body .season-calendar-days button.is-endpoint{
 background:var(--map-selected);border-color:var(--map-selected);color:#fff9ef;
}
body :is(#mobile-map-filter-visibility,#mobile-season-map-controls,#mobile-search-tab,#mobile-map-search-trigger,#map-nadal-toggle,#mobile-calendar-toggle):focus-visible{outline:3px solid var(--map-selected);outline-offset:2px}
#map-dates-home[hidden]{display:none}
#map-dates-home:not([hidden]){display:flex;align-items:center;gap:5px;min-width:0;background:transparent;pointer-events:auto}
#map-dates-home #mobile-date-rail{flex:1;min-width:0}
#map-dates-home #mobile-calendar-slot{flex:none}
#map-dates-home #mobile-calendar-toggle{min-width:44px;min-height:44px}
body.parade-map-compact #season-map-tools-home,body.parade-map-compact #mobile-map-count{display:none}
.circuit-header-compact,.mobile-season-map-focused .circuit-header-compact,#season-map-dialog .circuit-header-compact{padding:4px 10px 7px;max-height:none;overflow:visible;position:relative;z-index:700}
.circuit-compact-top{display:flex;align-items:center;gap:8px;min-height:44px}
.circuit-compact-top .circuit-date{flex:1;margin:0;font-size:14px;font-weight:700}
.circuit-compact-top output{color:var(--map-selected);font:750 23px/1 var(--font-display,Georgia,serif);white-space:nowrap;font-variant-numeric:tabular-nums}
.circuit-info{position:relative;flex:none}
.circuit-info summary{display:grid;place-items:center;list-style:none;min-width:44px;min-height:44px;color:var(--map-selected);font:700 24px/1 Arial,sans-serif;cursor:pointer;border-radius:8px}
.circuit-info summary::-webkit-details-marker{display:none}
.circuit-info summary:focus-visible{outline:2px solid var(--map-selected);outline-offset:-2px}
.circuit-info[open] summary{background:var(--map-selected);color:#fff9ef}
.circuit-info>div{position:absolute;right:0;top:100%;width:min(290px,calc(100vw - 36px));padding:14px;border:1px solid #c9a984;border-radius:10px;background:#fff9ef;box-shadow:0 4px 16px #301a2833;font:400 14px/1.4 var(--agenda-control-font,Arial,sans-serif)}
.circuit-info p{margin:6px 0 0}
.circuit-info button{min-height:44px;margin-top:8px;padding:6px 10px;border:1px solid var(--map-selected);border-radius:8px;color:var(--map-selected);background:#fff9ef}
body .circuit-header-compact input[type=range]{height:44px;margin:-5px 0 0}
body .circuit-header-compact .circuit-ticks{font-size:12px;margin-top:-5px;pointer-events:none}
body .circuit-header-compact .circuit-help{font-size:13px;line-height:1.25;margin-top:4px}
.parade-map-compact .circuit-footer{gap:6px;min-height:44px;padding:3px 10px}
.parade-map-compact .circuit-location{flex:1;font-size:13px}
.parade-map-compact .circuit-location small{display:block;margin:2px 0 0;font-size:12px}
.parade-map-compact .circuit-footer .text-button{font-size:14px;min-height:44px;display:flex;align-items:center;white-space:nowrap}
@media(max-width:760px){
 body.mobile-map-open #mobile-map-overlay{background:transparent;border:0;padding:0;box-shadow:none}
 body.music-map-compact #mobile-map-overlay{display:grid}
 .music-map-compact .topbar{gap:2px;flex-wrap:nowrap;padding-inline:5px}
 .music-map-compact .topbar>.brand,.music-map-compact #mobile-view-tabs-slot,.music-map-compact #plan-filters{display:none}
 .music-map-compact #mobile-season-map-header:not([hidden]){display:flex;align-items:center;gap:4px;flex:1;min-width:0;color:#301a28}
 .music-map-compact #mobile-language-slot .dock-logo{min-width:44px;width:44px;min-height:44px;height:44px}
 .music-map-compact #mobile-language-slot .dock-logo img{height:26px}
 .music-map-compact #mobile-map-overlay .map-reset-toolbar:has(#map-family-add:not([hidden])) #mobile-map-filter-visibility{width:auto;font-size:14px;padding-inline:8px;gap:5px}
 .music-map-compact #mobile-map-overlay #mobile-map-filter-visibility-label{position:static;width:auto;height:auto;clip-path:none;overflow:visible}
 .music-map-compact #map-family-add{flex:1;min-width:0;padding-inline:6px;font-size:13px}
 .music-map-compact #map-clear-filters{padding-inline:6px}
}
@media(max-width:760px){
 body.mobile-map-open #map-dates-home #mobile-date-rail{display:flex}
 body.mobile-map-open #map-dates-home #mobile-calendar-slot{display:block}
}

@media(max-width:760px){body.music-map-compact.mobile-map-filters-collapsed #plan-filters{display:none}}
body.parade-map-compact #season-map-dialog-tools{display:none}
body.parade-map-compact #season-map-dialog[open]{grid-template-rows:auto minmax(0,1fr) auto}

@media(min-width:761px){
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-overlay{position:absolute;inset:8px 8px auto;z-index:650;display:grid;gap:7px;pointer-events:none;background:transparent}
 body.desktop-map-open #mobile-map-overlay>*{pointer-events:auto}
 body.desktop-map-open #mobile-map-overlay #desktop-filter-deck{order:1;background:transparent;border:0;padding:0}
 body.desktop-map-open #mobile-map-overlay #map-reset-toolbar{order:1}
 body.desktop-map-open #desktop-map-controls:empty,body.music-map-compact #desktop-map-controls{display:none}
}
@media(min-width:761px){
 body.desktop-map-open #mobile-map-overlay #desktop-filter-deck{grid-template-columns:minmax(0,1fr)}
 body.desktop-map-open #desktop-clear-slot,body.desktop-map-open #desktop-audience-slot{display:none}
 body.desktop-map-open #desktop-map-nadal-row{display:flex;align-items:center;gap:7px;grid-column:1/-1;margin:0;padding:0;background:transparent;border:0}
 body.desktop-map-open #desktop-map-kinds-home:empty{display:none}
 body.desktop-map-open #desktop-map-search-home{flex:1;min-width:0}
 body.desktop-map-open #desktop-map-search-home .search{width:100%;max-width:none}
 body.desktop-map-open #desktop-map-nadal-row #map-reset-toolbar{flex:none;margin:0;padding:0;background:transparent;border:0}
}
@media(min-width:761px){body.desktop-map-open #mobile-map-overlay #mobile-map-tools button{min-height:44px}}

/* Desktop maps: one tool row, one family action, unobstructed footer. */
@media(min-width:761px){
 body.desktop-map-open:not(.season-map-contextual) #mobile-agenda-map-view>.agenda-map-layout{overflow-anchor:none;--stage-height:clamp(440px,calc(100dvh - 250px),780px);--agenda-map-side:clamp(280px,23vw,360px)}
 body.desktop-map-open:not(.season-map-contextual) .mobile-map-selection:not([hidden]){height:auto;align-self:stretch;max-height:calc(var(--stage-height) + var(--map-season-overlay-height,88px))}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-overlay{gap:6px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-overlay .desktop-facet-row,
 body.desktop-map-open:not(.season-map-contextual) #desktop-family-filter,
 body.desktop-map-open:not(.season-map-contextual) #desktop-map-kinds-home,
 body.desktop-map-open:not(.season-map-contextual) #desktop-map-search-home:empty,
 body.desktop-map-open:not(.season-map-contextual) #map-nadal-all{display:none}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-overlay #desktop-filter-deck{display:block}
 body.desktop-map-open:not(.season-map-contextual).music-map-compact #mobile-map-overlay #desktop-filter-deck{display:none}
 body.desktop-map-open:not(.season-map-contextual) #desktop-map-nadal-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
 body.desktop-map-open:not(.season-map-contextual) #desktop-map-nadal-row #map-reset-toolbar,
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-overlay>#map-reset-toolbar{display:flex;flex:1;align-items:center;flex-wrap:wrap;gap:6px;justify-content:flex-start;margin:0;padding:0;background:transparent}
 body.desktop-map-open:not(.season-map-contextual) #map-reset-toolbar #mobile-map-filter-visibility:not([hidden]){display:inline-flex;order:0;align-items:center;gap:6px;min-height:44px;padding:0 10px;font:700 14px/1.1 var(--agenda-control-font);border:1px solid #b49a79;border-radius:8px;background:#fffaf0;color:var(--map-selected)}
 body.desktop-map-open:not(.season-map-contextual) #map-reset-toolbar #mobile-map-filter-visibility:is([aria-expanded=true],[aria-pressed=true]){background:var(--map-selected);color:#fffaf0}
 body.desktop-map-open:not(.season-map-contextual) #map-reset-toolbar #mobile-map-search-trigger:not([hidden]){display:block;order:1;flex:none}
 body.desktop-map-open:not(.season-map-contextual) #map-reset-toolbar #mobile-search-tab{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid #b49a79;border-radius:8px;background:#fffaf0;color:var(--map-selected)}
 body.desktop-map-open:not(.season-map-contextual) #map-reset-toolbar #mobile-search-tab[aria-expanded=true]{background:var(--map-selected);border-color:var(--map-selected);color:#fffaf0}
 body.desktop-map-open:not(.season-map-contextual) #map-family-add[disabled]{display:none}
 body.desktop-map-open:not(.season-map-contextual) #mobile-search-tab svg{width:20px;height:20px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-search-tab>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body.desktop-map-open:not(.season-map-contextual) #map-family-add{order:2;min-height:44px;padding:0 9px;font-size:14px;white-space:nowrap}
 body.desktop-map-open:not(.season-map-contextual) #map-clear-filters{order:3;min-height:44px;padding:0 9px;font-size:14px;white-space:nowrap;margin-left:auto}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-search-home:not([hidden]){display:block;order:2;width:min(360px,100%);pointer-events:auto}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-search-home .search{display:flex;align-items:center;gap:7px;min-height:44px;margin:0;padding:0 10px;background:#fffaf0;border:1px solid #b49a79;border-radius:8px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-search-home input{width:100%;min-width:0;font:400 14px/1.3 var(--agenda-control-font)}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-search-home svg{width:18px;height:18px;flex:none}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-stage>#mobile-season-maps:not([hidden]){position:relative;inset:auto;z-index:1;padding:6px 8px;margin:0;background:#fbf3dc;backdrop-filter:none;border-top:1px solid #d9c8ad}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-stage>#mobile-season-maps .mobile-season-rail-head{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 2px;margin:0}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-stage>#mobile-season-maps h2{font-size:16px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-stage>#mobile-season-maps .mobile-season-map-links>a{font-size:14px;min-height:44px;padding:3px 8px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-stage>#mobile-season-maps .mobile-season-map-links>a img{width:24px;height:24px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-map-canvas .leaflet-bottom.leaflet-left{bottom:0}
 #desktop-map-list-toggle-home{margin-left:auto;flex:none}
 #desktop-map-list-toggle-home:empty,#desktop-map-list-toggle-home:has(>button[hidden]){display:none}
 #desktop-map-list-toggle-home #map-results-toggle{position:static;inset:auto;transform:none;min-height:36px;padding:4px 9px;box-shadow:none;font-size:14px}
 body.desktop-map-open:not(.season-map-contextual) #mobile-season-map-more{margin-left:0}
}
