/* Map frame (Places to play and Coaching, wwwroot/js/map-frame.js): the map box's
   Minimize and Full screen buttons, the bar that stands in for a minimized map, and the
   full-screen layer. The pages size the map box themselves and lay out their own Map
   view on full screen (.is-map-max on that view's layout). */
.msm-mapframe { position: relative; }

/* The buttons sit over the map's top-right corner, clear of Leaflet's zoom buttons
   (top-left). They appear once the script has wired them. */
.msm-mapframe-tools { position: absolute; top: var(--ds-space-2); right: var(--ds-space-2); z-index: 1000; display: none; gap: var(--ds-space-1); }
.msm-mapframe[data-ready] .msm-mapframe-tools { display: flex; }
.msm-mapframe-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-2);
    min-width: 40px; height: 40px; padding: 0 var(--ds-space-3);
    border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-sm);
    background: var(--ds-surface); color: var(--ds-ink-900);
    font: inherit; font-size: var(--ds-type-label); font-weight: 700; white-space: nowrap;
    box-shadow: var(--ds-shadow-md); cursor: pointer;
}
.msm-mapframe-btn:hover { background: var(--ds-surface-2); }
.msm-mapframe-btn:focus-visible { outline: 2px solid var(--ds-focus-ring); outline-offset: 2px; }
/* On full screen the button reads "Exit full screen" in words, and Minimize steps aside. */
.msm-mapframe-btn-text { display: none; }
.msm-mapframe[data-size="max"] .msm-mapframe-btn-text { display: inline; }
.msm-mapframe[data-size="max"] [data-map-size="min"] { display: none; }

/* Minimized: a slim bar in the map's place, with the way back. */
.msm-mapframe-bar {
    display: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--ds-space-3);
    padding: var(--ds-space-2) var(--ds-space-3);
    border: 1px dashed var(--ds-border-strong); border-radius: var(--ds-radius-lg);
    background: var(--ds-surface); color: var(--ds-ink-500); font-size: var(--ds-type-body-small);
}
.msm-mapframe-bar i { color: var(--ds-brand); }
.msm-mapframe-bar .btn { min-height: 36px; }
.msm-mapframe[data-size="min"] .msm-mapframe-bar { display: flex; }
.msm-mapframe[data-size="min"] > :not(.msm-mapframe-bar) { display: none; }

/* Full screen, the frame alone (the map above the List). The Map view puts its whole
   layout on full screen instead (the page's own .is-map-max rules). */
.msm-mapframe.is-map-max { position: fixed; inset: 0; z-index: 1060; padding: var(--ds-space-3); background: var(--ds-canvas); }
.msm-mapframe.is-map-max > [role="region"] { height: 100%; }
.msm-mapframe.is-map-max .msm-mapframe-tools { top: calc(var(--ds-space-3) + var(--ds-space-2)); right: calc(var(--ds-space-3) + var(--ds-space-2)); }
html.msm-map-max-open, html.msm-map-max-open body { overflow: hidden; }
