/*
 * top-hud.css — Top HUD: balance / bet / menu / timer / audio
 *               + phase pill (now BELOW the Pixel Streaming video).
 *
 * The LIVE row and centered phase pill were removed in the "clear dealer
 * zone" pass. The dealer's face/body is the cinematic hero — no UI may
 * overlap it. The phase pill is now anchored at the top of the dark UI
 * zone, just below the stream.
 *
 * Current bet is shown here and ONLY here.
 */

#bj-top-hud {
    position: absolute;
    top: calc(var(--safe-top) + 6px);
    left: 16px;
    right: 16px;
    z-index: var(--z-top-hud);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-ui);
}

/* ── Main HUD bar (only row that remains) ────────────────────────────────── */
.bj-hud-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bj-hud-row--main {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    padding: 6px 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bj-hud-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    cursor: pointer;
    flex: 0 0 auto;
    transition: background var(--t-fast), color var(--t-fast);
}

.bj-hud-icon-btn:hover,
.bj-hud-icon-btn:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.bj-hud-icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.bj-hud-stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 8px;
    border-left: 1px solid var(--hairline);
}

.bj-hud-stat:first-of-type {
    border-left: none;
}

.bj-hud-stat__label {
    font-size: 9px;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
}

.bj-hud-stat__value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bj-hud-stat__value--muted {
    color: var(--text-tertiary);
}

/* ── Betting timer dot inside the timer icon button ──────────────────────── */
.bj-hud-timer-btn {
    position: relative;
}

.bj-hud-timer-btn__count {
    position: absolute;
    bottom: 1px;
    right: 1px;
    font-size: 9px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.75);
    border-radius: var(--r-pill);
    padding: 1px 4px;
    line-height: 1;
    min-width: 14px;
    text-align: center;
}

.bj-hud-timer-btn__count--urgent {
    color: var(--lose);
    animation: bj-urgent-flash 1s ease-in-out infinite;
}

@keyframes bj-urgent-flash {
    50% { opacity: 0.5; }
}

/* ── Error toast ─────────────────────────────────────────────────────────── */
.bj-hud-error {
    margin-top: 4px;
    background: rgba(248, 113, 113, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fed7d7;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: bj-toast-in var(--t-med) var(--ease-out-quint);
}

@keyframes bj-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Phase pill — now BELOW the video, in the dark UI zone ───────────────── */
/*
 * Anchored to the bottom edge of the stream so it never overlaps the
 * MetaHuman dealer. Full-width pill (left/right inset) with a thin gold
 * border and left-aligned text so it reads as a status strip rather than a
 * floating banner.
 */
.bj-phase-pill {
    /* Mounted into #bj-slot-phase — flow as a normal flex child. */
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(20, 20, 26, 0.85);
    border: 1px solid var(--gold-soft);
    border-radius: var(--r-md);
    color: var(--gold);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    transition: opacity var(--t-med) var(--ease-out-quint);
}

.bj-phase-pill__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    flex-shrink: 0;
}

.bj-phase-pill__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.bj-phase-pill__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bj-phase-pill__sub {
    margin-top: 2px;
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.4px;
    font-weight: 500;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
