/* Bloomin' Festival map (map.js), the team's map tools (team-map.js) and the public map (map/). Colours follow Br. Nicholas's map. */
.bfm-host { position: relative; background: #5a7443; overflow: hidden; touch-action: none; }
.bfm-svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.bfm-svg:active { cursor: grabbing; }
.bfm-svg text { font-family: "Figtree", "Segoe UI", Arial, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.bfm-item { cursor: pointer; }
.bfm-editing .bfm-item, .bfm-booth { cursor: move; }
.bfm-static .bfm-item { cursor: default; }

/* booths */
.bfm-booth .bfm-body { stroke-width: 0.45; }
.bfm-booth.bfm-open .bfm-body { stroke-dasharray: 1.6 1; stroke-width: 0.5; }
.bfm-div { stroke-width: 0.35; }
.bfm-num { font-weight: 700; letter-spacing: -0.02em; }
.bfm-far .bfm-num, .bfm-far .bfm-dot, .bfm-far .bfm-pow { display: none; }
.bfm-warn { animation: bfm-blink 1.2s ease-in-out infinite alternate; }
@keyframes bfm-blink { to { opacity: .35; } }

/* site elements */
.bfm-in { font-weight: 700; }
.bfm-lbl, .bfm-area-t, .bfm-freetext { font-weight: 700; fill: #1d2422; paint-order: stroke; stroke: #fff; stroke-linejoin: round; }
.bfm-lbl { font-size: max(calc(var(--f) * 1px), calc(12px / var(--k))); stroke-width: calc(3px / var(--k)); dominant-baseline: hanging; }
.bfm-area-t { font-size: max(calc(var(--f) * 1px), calc(13px / var(--k))); stroke-width: calc(3px / var(--k)); dominant-baseline: hanging; }
.bfm-freetext { stroke-width: calc(3px / var(--k)); }
.bfm-svg:not(.bfm-near) .bfm-lbl { display: none; }
.bfm-mk { transform: scale(max(1, calc(22 / (var(--k) * var(--d))))); }

/* building names: dark letters with a white halo */
.bfm-bldg-t { font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: .04em; fill: #1d2422; paint-order: stroke; stroke: #fff; stroke-linejoin: round;
  font-size: max(calc(var(--f) * 1px), calc(11px / var(--k))); stroke-width: calc(3.5px / var(--k)); }
.bfm-bldg { pointer-events: none; }
.bfm-editing .bfm-bldg { pointer-events: all; }

/* the 12 ft grid booths snap to (shown while snapping) */
.bfm-grid path { fill: none; stroke: rgba(255, 255, 255, .26); stroke-width: 1; pointer-events: none; }
.bfm-far .bfm-grid path { stroke: rgba(255, 255, 255, .14); }

/* selection, handles, search highlight */
.bfm-selbox { fill: none; stroke: #fecf33; stroke-dasharray: 6 3; vector-effect: non-scaling-stroke; }
.bfm-handle { fill: #fff; stroke: #a25903; cursor: nwse-resize; }
.bfm-handle[data-h="n"], .bfm-handle[data-h="s"] { cursor: ns-resize; }
.bfm-handle[data-h="e"], .bfm-handle[data-h="w"] { cursor: ew-resize; }
.bfm-handle[data-h="ne"], .bfm-handle[data-h="sw"] { cursor: nesw-resize; }
.bfm-roth { cursor: grab; fill: #fecf33; }
.bfm-rotline { stroke: #a25903; }
.bfm-boxsel { fill: rgba(254, 207, 51, .15); stroke: #fecf33; stroke-dasharray: 5 3; }
.bfm-dim .bfm-item:not(.bfm-hi) { opacity: .32; }
.bfm-dim .bfm-bldg:not(.bfm-hi) { opacity: 1; }
.bfm-hi .bfm-body, .bfm-hi circle:first-child { stroke: #fecf33 !important; stroke-width: calc(4px / var(--k)) !important; stroke-dasharray: none !important; }
.bfm-hi { animation: bfm-pulse 1.4s ease-in-out 3; }
@keyframes bfm-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .bfm-hi, .bfm-warn { animation: none; } }

/* zoom buttons on the map */
.bfm-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; gap: 6px; z-index: 2; }
.bfm-zoom button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #1d2422; font: 700 1.3rem/1 Arial, sans-serif; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); cursor: pointer; }
.bfm-zoom button:focus-visible { outline: 3px solid #fecf33; outline-offset: 2px; }
.bfm-zoom .bfm-zfit { font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.bfm-zoom svg { display: block; margin: auto; }

/* full screen (the browser's own, or covering the window where that isn't offered, e.g. iPhone) */
.bfm-full { position: fixed !important; inset: 0 !important; z-index: 1000; width: auto !important; height: auto !important; max-height: none !important; min-height: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
html.bfm-full-page, html.bfm-full-page body { overflow: hidden; }
.pmap-frame:fullscreen { border: 0; border-radius: 0; }

/* legend (poster and public page) */
.bfm-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 18px 28px; }
.bfm-legend h3 { font: 600 .78rem/1.2 var(--bf-label, Arial, sans-serif); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; color: inherit; }
.bfm-legend ul, .bfm-legend ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bfm-lg-zones li, .bfm-lg-icons li { display: flex; align-items: center; gap: 10px; }
.bfm-lg-zones i { width: 22px; height: 16px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .3); flex: none; }
.bfm-lg-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.bfm-lg-booths { grid-column: 1 / -1; }
.bfm-lg-booths ol { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 2px 20px; }
.bfm-lg-booths b { display: inline-block; min-width: 2.4em; }

/* printing the poster */
.bfm-print { display: none; }
@media print {
  body.bfm-printing > *:not(.bfm-print) { display: none !important; }
  body.bfm-printing { background: #fff !important; }
  body.bfm-printing .bfm-print { display: grid; grid-template-rows: auto 1fr auto; gap: 10pt; height: 100vh; color: #000; font-family: Arial, Helvetica, sans-serif; }
  .bfm-print header { display: flex; align-items: baseline; gap: 14pt; }
  .bfm-print h1 { font: 700 22pt/1 Georgia, serif; margin: 0; }
  .bfm-print header p { margin: 0; font-size: 11pt; }
  .bfm-print-map { position: relative; min-height: 0; border: 1pt solid #545454; }
  .bfm-print-map .bfm-svg { position: absolute; inset: 0; }
  .bfm-print .bfm-legend { font-size: 8.5pt; gap: 6pt 18pt; }
  .bfm-print-poster .bfm-legend { font-size: 14pt; }
  .bfm-print .bfm-lg-booths ol { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
  .bfm-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== the team's map (team-map.js) ===== */
.tmap { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 520px; }
.tmap:fullscreen { height: 100%; min-height: 0; background: var(--bf-paper); }
.tmap.bfm-full { min-height: 0; background: var(--bf-paper); }
.tmap-demo { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: #7c3aed; color: #fff; font: 700 .62rem/1.3 var(--bf-label); letter-spacing: .1em; text-transform: uppercase; }
.tmap-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--bf-rule); background: var(--bf-paper); }
.tmap-bar .tmap-sep { width: 1px; height: 28px; background: var(--bf-rule); }
.tmap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--bf-rule); background: var(--bf-card); color: var(--bf-ink); font: 600 .78rem/1.2 var(--bf-label); letter-spacing: .08em; text-transform: uppercase; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.tmap-btn svg { flex: none; }
.tmap-btn:hover { border-color: var(--bf-ink-soft); }
.tmap-btn[aria-pressed="true"] { background: var(--bf-ink); border-color: var(--bf-ink); color: var(--bf-paper); }
.tmap-btn.tmap-edit[aria-pressed="true"] { background: #fecf33; border-color: #a25903; color: #343434; }
.tmap-btn:disabled { opacity: .4; cursor: default; }
.tmap-btn:focus-visible, .tmap-x:focus-visible { outline: 3px solid var(--bf-honey); outline-offset: 2px; }
.tmap-btn svg { width: 16px; height: 16px; }
.tmap-search { flex: 1 1 12rem; min-width: 8rem; max-width: 20rem; font: inherit; font-size: .95rem; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--bf-rule); background: var(--bf-card); color: var(--bf-ink); padding: 0 14px; }
.tmap-status { margin-left: auto; font-size: .85rem; color: var(--bf-ink-soft); white-space: nowrap; }
.tmap-status.tmap-bad { color: var(--tm-err, #b91c1c); font-weight: 700; }
.tmap-main { position: relative; min-height: 0; }
.tmap-main .bfm-host { position: absolute; inset: 0; }
.tmap-editing .tmap-main::after { content: "Editing the map"; position: absolute; left: 12px; top: 12px; z-index: 2; background: #fecf33; color: #343434; font: 700 .72rem/1 var(--bf-label); letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; pointer-events: none; }
.tmap-editing .tmap-main { box-shadow: inset 0 0 0 5px #fecf33; }
.tmap-editing .tmap-main .bfm-host { inset: 5px; }
.tmap-placing .tmap-main::before { content: attr(data-placing); position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 2; background: #004069; color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; pointer-events: none; max-width: 90%; text-align: center; }
.tmap-side { border-left: 1px solid var(--bf-rule); background: var(--bf-paper); overflow-y: auto; overflow-x: hidden; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.tmap-side .bf-label + h2 { margin-top: 2px; }
.tmap-card > * { min-width: 0; }
.tmap-vlist b, .tmap-vlist small { overflow-wrap: anywhere; }
.tmap-side h2 { font-size: 1.5rem; margin: 0; }
.tmap-side h3 { font: 600 .74rem/1.2 var(--bf-label); letter-spacing: .14em; text-transform: uppercase; color: var(--bf-ink-soft); margin: 4px 0 0; }
.tmap-card { background: var(--bf-card); border: 1px solid var(--bf-rule); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.tmap-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tmap-field { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.tmap-field input, .tmap-field select, .tmap-side input[type="text"], .tmap-side input[type="number"] { font: inherit; font-weight: 400; font-size: 1rem; min-height: 42px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--bf-rule); background: var(--bf-paper); color: var(--bf-ink); width: 100%; }
.tmap-size { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: end; }
.tmap-size span { padding-bottom: 12px; color: var(--bf-ink-soft); }
.tmap-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: .92rem; cursor: pointer; }
.tmap-switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #c9d2ce; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.tmap-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .15s; }
.tmap-switch input:checked { background: #2c736d; }
.tmap-switch input:checked::after { left: 21px; }
.tmap-switch input:focus-visible { outline: 3px solid var(--bf-honey); outline-offset: 2px; }
.tmap-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.tmap-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .25); cursor: pointer; padding: 0; }
.tmap-swatches button[aria-pressed="true"] { outline: 3px solid var(--bf-ink); outline-offset: 2px; }
.tmap-swatches .tmap-clear { background: repeating-linear-gradient(45deg, #fff 0 5px, #eee 5px 10px); }
.tmap-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.tmap-icons button { height: 42px; border-radius: 10px; border: 1.5px solid var(--bf-rule); background: var(--bf-paper); color: var(--bf-ink); cursor: pointer; display: grid; place-items: center; }
.tmap-icons button[aria-pressed="true"] { background: var(--bf-ink); color: var(--bf-paper); border-color: var(--bf-ink); }
.tmap-vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
.tmap-vlist button { width: 100%; text-align: left; display: grid; gap: 2px; padding: 8px 10px 8px 12px; border-radius: 10px; border: 1px solid var(--bf-rule); border-left: 5px solid var(--st, #64748b); background: var(--bf-card); color: var(--bf-ink); font: inherit; cursor: grab; }
.tmap-vlist button[aria-pressed="true"] { outline: 3px solid #fecf33; }
.tmap-vlist small { color: var(--bf-ink-soft); }
.tmap-muted { color: var(--bf-ink-soft); font-size: .9rem; margin: 0; }
.tmap-warn { color: #b91c1c; font-weight: 700; font-size: .9rem; margin: 0; }
.tmap-x { background: none; border: 0; color: var(--bf-ink-soft); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.tmap-danger { color: #b91c1c !important; border-color: #f0b4b4 !important; }
.tmap-dialog { border: 0; border-radius: 18px; padding: 0; width: min(36rem, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--bf-paper); color: var(--bf-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.tmap-dialog::backdrop { background: rgba(16, 24, 22, .5); }
.tmap-dialog form { display: grid; gap: 14px; padding: 20px; }
.tmap-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 8px; }
.tmap-kinds button { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--bf-rule); background: var(--bf-card); color: var(--bf-ink); font: 600 .85rem/1.2 inherit; cursor: pointer; text-align: center; }
.tmap-kinds button[aria-pressed="true"] { border-color: var(--bf-ink); box-shadow: inset 0 0 0 2px var(--bf-ink); }
.tmap-kinds i { width: 34px; height: 24px; border-radius: 4px; display: block; border: 1px solid rgba(0, 0, 0, .3); }
.tmap-help { font-size: .82rem; color: var(--bf-ink-soft); margin: 0; }
@media (max-width: 60em) {
  .tmap { grid-template-columns: 1fr; grid-template-rows: auto minmax(320px, 1fr) auto; height: auto; min-height: 0; }
  .tmap-main { height: 62vh; height: 62dvh; }
  .tmap-side { border-left: 0; border-top: 1px solid var(--bf-rule); max-height: none; }
  .tmap-status { width: 100%; margin-left: 0; order: 9; }
  .tmap-btn { min-height: 44px; padding: 0 12px; }
  .tmap-btn svg + .tmap-t { display: none; }
  .tmap-bar { gap: 6px; }
  .tmap:fullscreen, .tmap.bfm-full { grid-template-rows: auto minmax(0, 1fr) auto; }
  .tmap:fullscreen .tmap-main, .tmap.bfm-full .tmap-main { height: auto; }
  .tmap:fullscreen .tmap-side, .tmap.bfm-full .tmap-side { max-height: 36vh; }
}

/* ===== the public map (map/) ===== */
.pmap-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 14px; }
.pmap-tools input, .pmap-tools select { font: inherit; font-size: 1rem; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--bf-rule); background: var(--bf-card); color: var(--bf-ink); padding: 0 18px; }
.pmap-tools input { flex: 1 1 14rem; }
.pmap-frame { position: relative; height: 72vh; height: 72dvh; min-height: 420px; border-radius: 6px; overflow: hidden; border: 1px solid var(--bf-rule); }
.pmap-frame .bfm-host { position: absolute; inset: 0; }
.pmap-card { position: absolute; left: 12px; right: 70px; bottom: 12px; z-index: 3; background: var(--bf-card); color: var(--bf-ink); border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); display: grid; gap: 4px; max-width: 26rem; }
.pmap-card[hidden] { display: none; }
.pmap-card h2 { font-size: 1.35rem; margin: 0; padding-right: 30px; }
.pmap-card p { margin: 0; color: var(--bf-ink-soft); }
.pmap-card .pmap-close { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 1.5rem; color: var(--bf-ink-soft); cursor: pointer; }
.pmap-yours { background: #fecf33; color: #343434; border-radius: 6px; padding: 14px 18px; font-weight: 700; margin-bottom: 14px; }
.pmap-yours[hidden], .pmap-empty[hidden] { display: none; }
.pmap-legend { margin-top: 24px; }
@media print { .pmap-frame { height: 70vh; } }
