/*
 * Football board: log a play by voice (CR req_0kmgXzlRYkRV). The hold-to-talk mic, the allowance line,
 * the confirm card and the "Heard" panel (resources/views/components/football-voice-control.blade.php,
 * public/js/score-keeper/football-voice.js). Brand tokens only: the football board's own
 * (--football-primary in football.css) and the site tokens of core/variables.css. Mobile first (390 px).
 */

.fbv {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

/* The mic: a wide, thumb-sized press target (56 px minimum), held down while speaking. */
.fbv-mic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px 16px;
    border: 2px solid var(--football-primary);
    border-radius: 14px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font: inherit;
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    /* A long press must not scroll, zoom, select or open a menu. */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.fbv-mic:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.fbv.is-pressed .fbv-mic {
    background: var(--football-primary);
    color: #ffffff;
    transform: scale(0.98);
}

.fbv.is-exhausted .fbv-mic {
    opacity: 0.6;
}

.fbv-line {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.fbv-line--warn,
.fbv-line--error {
    padding-left: 8px;
    border-left: 3px solid var(--color-warning);
    color: var(--text-primary);
}

.fbv-more {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--football-primary);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

/* The first-use notice: one line, with its own "Got it". */
.fbv-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.fbv-notice-ok {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--football-primary);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* The confirm card: sits in the strip (not over the scoreboard); nothing is saved until Save. */
.fbv-card {
    position: relative;
    padding: 12px 44px 12px 14px;
    border: 2px solid var(--football-primary);
    border-radius: 14px;
    background: var(--bg-elevated);
}

.fbv-card-text {
    margin: 0 0 10px;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.fbv-card-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-2xl);
    line-height: 1;
    cursor: pointer;
}

.fbv-card-actions {
    display: flex;
    gap: 10px;
}

.fbv-btn {
    flex: 1;
    min-height: 48px;
    border: 2px solid var(--football-primary);
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.fbv-btn--save {
    background: var(--football-primary);
    color: #ffffff;
}

.fbv-btn--edit {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* What was heard when it could not become a play (tap to dismiss). */
.fbv-heard {
    padding: 10px 14px;
    border-left: 3px solid var(--color-warning);
    border-radius: 8px;
    background: var(--bg-elevated);
    cursor: pointer;
}

.fbv-heard-text {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.fbv [hidden] {
    display: none;
}

@media (min-width: 768px) {
    .fbv {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 16px;
    }

    .fbv-mic {
        width: auto;
        min-width: 220px;
    }

    .fbv-card,
    .fbv-heard,
    .fbv-notice {
        flex: 1 1 100%;
    }
}
