/* Public venue map (/map). Uses the site tokens from demo.css. Built phone-first:
   that's how most people will open it at the event. */
.venue-map { padding-bottom: 4rem; }
.vm-title { padding-top: 1.6rem; margin-bottom: .3rem; }
.vm-sub { color: var(--d-fg-dim); font-family: "Jersey 20", sans-serif; font-size: 20px; letter-spacing: .08em; margin-bottom: 1rem; text-transform: uppercase; }

/* Colours: vendors light, sponsors gold, the one you picked green, free tables dim */
.venue-map { --vm-vendor: #d9c16a; --vm-sponsor: #ffcc00; --vm-pick: #3dff8a; --vm-free: #5a4489; --vm-free-line: #7d69b3; --vm-bg: #3a2759; }

/* Pinned search + floor tabs */
.vm-bar {
  position: sticky; top: 0; z-index: 20; background: var(--d-bg);
  padding: 10px 0 10px; margin: 0 auto 10px; max-width: 900px;
}
.vm-bar .pixel-input-field { width: 100%; margin-bottom: 8px; }
.vm-floors { display: flex; gap: 8px; justify-content: center; }
.vm-floors button {
  font-family: "Jersey 20", sans-serif; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  background: transparent; color: var(--d-fg); border: 0; box-shadow: inset 0 0 0 2px var(--d-hair);
  padding: 8px 16px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; flex: none;
}
.vm-floors button:hover { box-shadow: inset 0 0 0 2px var(--d-fg); }
.vm-floors button[aria-selected="true"] { background: var(--d-fg); color: var(--d-bg); box-shadow: none; }
.vm-floors .vm-count { opacity: .6; margin-left: 6px; }

.vm-panel { max-width: 900px; margin: 0 auto; }
.vm-legend {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; gap: 12px; flex-wrap: wrap; pointer-events: none; max-width: calc(100% - 70px);
  font-family: "Jersey 20", sans-serif; font-size: 17px; letter-spacing: .06em; color: var(--d-fg); text-transform: uppercase;
  background: rgba(58,39,89,.88); padding: 4px 10px; box-shadow: inset 0 0 0 1px var(--d-hair);
}
.vm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vm-dot { display: inline-block; width: 14px; height: 14px; }
.vm-dot--vendor { background: var(--vm-vendor); }
.vm-dot--sponsor { background: var(--vm-sponsor); box-shadow: inset 0 0 0 2px #fff; }
.vm-dot--free { background: var(--vm-free); box-shadow: inset 0 0 0 1px var(--vm-free-line); }

/* The map window: pan by dragging, pinch / buttons / double-tap to zoom */
.vm-viewport {
  position: relative; overflow: hidden; background: var(--vm-bg); border: 1px solid var(--d-hair);
  height: min(70vh, 640px); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.vm-viewport.is-zoomed { touch-action: none; }
.vm-viewport.is-dragging { cursor: grabbing; }
.vm-svg { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.vm-svg svg { display: block; width: 100%; height: 100%; }
.vm-svg .vm-table { cursor: pointer; }
.vm-svg .vm-table rect { transition: fill .15s, stroke .15s; }
.vm-svg .vm-table:focus { outline: none; }
.vm-svg .vm-table:focus rect { stroke: var(--vm-pick) !important; stroke-width: 1.4px !important; }
.vm-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--d-fg-dim); margin: 0; width: 100vw; max-width: 100%; }
.vm-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.vm-zoom button {
  width: 44px; height: 44px; font-family: "Public Pixel", monospace; font-size: 16px; line-height: 1;
  background: rgba(58,39,89,.9); color: var(--d-fg); border: 0; box-shadow: inset 0 0 0 2px var(--d-hair); cursor: pointer;
}
.vm-zoom button:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--d-fg); }
.vm-zoom button:disabled { opacity: .35; cursor: default; }
.vm-hint { margin: 8px 0 0; text-align: center; color: var(--d-fg-dim); font-size: 15px; }

/* Vendor card: under the map on wide screens, a bottom sheet on phones */
.vm-card {
  position: relative; display: flex; gap: 16px; align-items: center; max-width: 900px; margin: 14px auto 0; padding: 16px 18px;
  background: var(--d-bg2); border: 2px solid var(--vm-pick);
}
.vm-card[hidden] { display: none; }
.vm-card img { width: 84px; height: 84px; object-fit: contain; background: #241a44; flex: none; padding: 6px; }
.vm-card .vm-card-body { min-width: 0; flex: 1; text-align: left; }
.vm-card h4 { font-size: 15px; margin: 0 0 6px; line-height: 1.5; overflow-wrap: anywhere; padding-right: 36px; }
.vm-card .vm-meta { font-family: "Jersey 20", sans-serif; font-size: 20px; letter-spacing: .06em; color: var(--vm-sponsor); text-transform: uppercase; line-height: 1.15; }
.vm-card .vm-what { color: var(--d-fg); margin: 6px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.vm-card .vm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vm-btn {
  font-family: "Jersey 20", sans-serif; font-size: 19px; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center;
  color: var(--d-fg); text-decoration: none; box-shadow: inset 0 0 0 2px var(--d-fg); background: transparent; border: 0; cursor: pointer;
}
.vm-btn:hover { background: var(--vm-sponsor); color: #000; box-shadow: inset 0 0 0 2px var(--vm-sponsor); }
.vm-close {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--d-fg);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.vm-badge { display: inline-block; background: var(--vm-sponsor); color: #1a0f3c; font-family: "Jersey 20", sans-serif; font-size: 16px; letter-spacing: .1em; padding: 0 8px; margin-left: 6px; vertical-align: middle; }

.vm-list-title { font-size: 14px; text-align: center; margin: 2.4rem 0 1rem; }
.vm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-width: 900px; margin: 0 auto; }
.vm-item {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 64px;
  background: var(--d-bg2); border: 1px solid var(--d-hair); color: var(--d-fg); padding: 8px 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.vm-item:hover, .vm-item.is-on { border-color: var(--vm-pick); background: var(--d-bg3); }
.vm-item img { width: 48px; height: 48px; object-fit: contain; background: #241a44; flex: none; padding: 3px; }
.vm-item .vm-item-name { display: block; font-family: "Jersey 20", sans-serif; font-size: 21px; letter-spacing: .04em; line-height: 1.1; overflow-wrap: anywhere; }
.vm-item .vm-item-where { display: block; color: var(--d-fg-dim); font-size: 15px; }
.vm-item .vm-star { color: var(--vm-sponsor); }
.vm-empty { grid-column: 1 / -1; text-align: center; color: var(--d-fg-dim); padding: 1.5rem 0; }

@media (max-width: 767px) {
  .vm-container { padding-left: 0; padding-right: 0; }
  .section.venue-map { padding-top: 0 !important; margin-top: 0 !important; }
  .vm-title { font-size: 16px; padding-top: .5rem; margin-bottom: 0; }
  .vm-sub { font-size: 16px; margin-bottom: 0; padding: 0 16px; }
  .vm-sub .vm-venue { display: none; }
  .vm-bar { padding: 6px 12px; margin-bottom: 0; box-shadow: 0 6px 12px rgba(0,0,0,.18); }
  .vm-bar .pixel-input-field { padding-top: 8px !important; padding-bottom: 8px !important; min-height: 44px; margin-bottom: 6px; }
  .vm-legend { font-size: 15px; gap: 8px; padding: 2px 8px; }
  .vm-floors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .vm-floors button { font-size: 17px; padding: 4px 8px; min-height: 38px; width: 100%; }
  .vm-viewport { height: min(66vh, 118vw); height: min(66svh, 118vw); border-left: 0; border-right: 0; }
  .vm-hint { font-size: 14px; padding: 0 16px; }
  /* bottom sheet over the map */
  .vm-card {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; margin: 0; max-width: none;
    border-width: 2px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(0,0,0,.45); max-height: 55vh; overflow-y: auto;
    animation: vm-sheet .2s ease-out;
  }
  .vm-card img { width: 64px; height: 64px; }
  .vm-list { padding: 0 12px; grid-template-columns: 1fr; }
  .vm-list-title { margin-top: 1.8rem; }
}
@keyframes vm-sheet { from { transform: translateY(100%); } to { transform: none; } }
