/* =====================================================================
   EHF — Exhibition floor plan (SVG 2D + 3D canvas + shared popover)
   Used by public/floorplan.php and admin/floorplan.php.
   Booths are rendered as an <svg> (viewBox = cols*20 x rows*20): native
   scaling, crisp text, free-form coordinates. The data model stays the
   grid (grid_x/y/w/h); the renderer multiplies by the 20-unit cell.
   ===================================================================== */

.fp-stage { padding: 18px; position: relative; }
.fp-grid-wrap { overflow: auto; }
.fp-grid { width: 100%; }

/* ---- the SVG plan ---- */
.fp-svg {
    display: block; width: 100%; max-width: 940px; height: auto; margin: 0 auto;
    border: 1px solid var(--glass-border); border-radius: 10px;
    background: var(--bg-deep);
}
.fp-svg text { font-family: var(--font-sans); }

.fp-bg { cursor: pointer; }
.fp-bg-rect { stroke: rgba(255, 255, 255, .14); stroke-width: 1; transition: filter .12s ease; }
.fp-bg:hover .fp-bg-rect { filter: brightness(1.14); }
.fp-blabel { font-weight: 800; letter-spacing: .01em; }   /* fill set inline per booth (readable on light tiers) */
.fp-bex { font-weight: 600; }

/* admin editor */
.fp-grid.is-editing .fp-bg { cursor: grab; }
.fp-grid.is-editing .fp-bg:active { cursor: grabbing; }
.fp-bg.is-selected .fp-bg-rect { stroke: rgb(var(--accent-rgb)); stroke-width: 3; }

/* ---- 3D canvas ---- */
.fp-canvas { width: 100%; display: block; border-radius: 10px; touch-action: none; }
.fp-canvas[hidden] { display: none; }   /* [hidden] must beat .fp-canvas's display:block (else the 3D canvas lingers below the 2D plan on toggle) */
.fp-note { margin-top: 10px; font-size: 13px; color: var(--text-dim); }

/* ---- legend chips ---- */
.fp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; }
.fp-dot-taken { position: relative; background: var(--text-faint); }
.fp-chip-taken { opacity: .85; }

/* ---- shared popover (2D + 3D) ---- */
.fp-popover {
    position: absolute;
    z-index: 60;
    max-width: 300px;
    padding: 12px 14px;
    border-radius: 12px;
    pointer-events: none;
    font-size: 12.5px;
}
.fp-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.fp-pop-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; }
.fp-pop-status.available { background: rgba(16, 185, 129, .18); color: #34d399; }
.fp-pop-status.reserved  { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.fp-pop-status.booked    { background: rgba(100, 116, 139, .25); color: var(--text-dim); }
.fp-pop-row { color: var(--text-dim); margin: 3px 0; }
.fp-pop-note { color: var(--text); border-left: 2px solid rgb(var(--accent-rgb)); padding-left: 8px; margin-top: 6px; }
.fp-pop-ex { display: flex; gap: 10px; margin-top: 8px; align-items: flex-start; }
.fp-pop-ex img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.fp-pop-name { font-weight: 700; color: var(--text); }
.fp-pop-blurb { color: var(--text-dim); font-size: 11.5px; margin-top: 2px; max-height: 48px; overflow: hidden; }
.fp-pop-link { display: inline-block; margin-top: 4px; color: rgb(var(--accent-rgb)); font-weight: 600; text-decoration: none; pointer-events: auto; }
