/* ============================================================
   STICKY MOBILE CTA BAR + JOIN-BY-CODE FORM
   ============================================================
   Two small conversion components shared by index / hosts /
   players. Wiring lives in main.js (guarded on element
   presence, like the rest of that file).

   Sticky bar layering is deliberate: z-index 65 sits above page
   content but BELOW the mobile drawer backdrop (70) and drawer
   (80) in nav.css, and below the cookie banner (9999) - so the
   bar needs no JS suppression while those are open; they simply
   cover it.

   All colors read theme tokens so every palette (Local / Green
   Room / Blue Hour) and the light themes work unchanged.
   ============================================================ */

/* ---- Sticky bar (phones + small tablets only) ---- */
.bf-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg-secondary);
    border-top: 1.5px solid rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
}
.bf-sticky-cta--show {
    transform: translateY(0);
    visibility: visible;
}
.bf-sticky-cta .bf-btn {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}
@media (min-width: 1024px) {
    .bf-sticky-cta { display: none; }
}

/* ---- Join-by-code ("already at a venue?") ---- */
.bf-join {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 0.75rem;
    margin: 0 auto;
}
.bf-join-label {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}
.bf-join-input {
    width: 8.5ch;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    border: 1.5px solid rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--glass-overlay-color), 0.06);
    color: var(--text-primary);
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-align: center;
}
.bf-join-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}
.bf-join-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.14em;
}
.bf-join .bf-btn { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.bf-join-err {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-danger, #c0392b);
    margin: 0;
}
.bf-join-err[hidden] { display: none; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .bf-sticky-cta { transition: none; }
}
