/*
 * Embed mode for the 3D venue twin on /built-with/rapid-tradeshow (?embed=1).
 * The scene gets the whole frame: the controls (#left) and analytics (#right)
 * panels start tucked away and slide in from a small toolbar. Copied in by
 * scripts/rapid-tradeshow/sync-venue.py; the venue app itself is unchanged.
 */
#rd-bar { display: none; }
.rd-embed #rd-bar {
    position: absolute; z-index: 20; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center;
    pointer-events: none;
}
.rd-embed #rd-bar > * { pointer-events: auto; }
.rd-embed .rd-group { display: flex; gap: 3px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.rd-embed .rd-btn {
    display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px;
    background: transparent; color: var(--text); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.rd-embed .rd-btn:hover { background: rgba(71, 85, 105, .6); }
.rd-embed .rd-btn[aria-pressed="true"] { background: var(--accent-strong); }
.rd-embed .rd-btn svg { width: 16px; height: 16px; flex: none; }
.rd-embed .rd-spacer { flex: 1; }

/* Panels: tucked away until asked for, then below the toolbar. */
.rd-embed #left, .rd-embed #right {
    top: 64px; max-height: calc(100vh - 78px);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s; will-change: transform;
}
.rd-embed #left { left: 12px; }
.rd-embed #right { right: 12px; }
.rd-embed:not(.rd-left) #left { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.rd-embed:not(.rd-right) #right { transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.rd-embed #left .brand { display: none; }
.rd-embed #booth-card { top: 64px; left: 12px; max-height: calc(100vh - 78px); }
.rd-embed.rd-left #booth-card { left: 326px; }
.rd-embed #minimap { right: 12px; bottom: 12px; }
.rd-embed.rd-right #minimap { right: 404px; }
.rd-embed #hud { bottom: 12px; }
.rd-embed #toast { top: 64px; }

@media (max-width: 1100px) { .rd-embed.rd-right #minimap { display: none; } }
@media (max-width: 900px) {
    .rd-embed .rd-hide-sm { display: none; }
    .rd-embed .rd-btn span { display: none; }
    .rd-embed.rd-left #booth-card { left: 12px; }
}

/* ?booth= opens that booth's card on load; in the embed it waits for a click. */
.rd-embed.rd-quiet #booth-card { display: none !important; }
