/* ReviewMode — top-of-page bar styling.
 * Mounted when ?review=1 is present. Fixed at top, above all UI.
 * State colors: idle (slate), recording (red pulse), finalizing (amber), error (deep red).
 */

.ffa-review-mode {
    --review-bar-h: 44px;
    padding-top: var(--review-bar-h);
}

.ffa-review-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    height: var(--review-bar-h, 44px);
    background: #111;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
    font-size: calc(13px * var(--type-scale, 1));
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    user-select: none;
}

.ffa-review-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 0 16px;
    max-width: 100%;
}

.ffa-review-bar__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff4d4d;
    text-transform: uppercase;
}

.ffa-review-bar__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d4d;
    box-shadow: 0 0 6px rgba(255, 77, 77, 0.7);
}

.ffa-review-bar__record[data-state="recording"] ~ .ffa-review-bar__label .ffa-review-bar__dot,
.ffa-review-bar[data-recording="1"] .ffa-review-bar__dot {
    animation: ffa-review-pulse 1.2s ease-in-out infinite;
}

@keyframes ffa-review-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.ffa-review-bar__surface {
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: calc(11px * var(--type-scale, 1));
    color: #ccc;
}

.ffa-review-bar__status {
    flex: 1 1 auto;
    color: #aaa;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.ffa-review-bar__status[data-status="recording"] { color: #ff8a8a; }
.ffa-review-bar__status[data-status="finalizing"] { color: #ffc857; }
.ffa-review-bar__status[data-status="error"] { color: #ff4d4d; }
.ffa-review-bar__status[data-status="requesting"] { color: #ffc857; }

.ffa-review-bar__timer {
    font-variant-numeric: tabular-nums;
    color: #ddd;
    min-width: 48px;
    text-align: right;
}

.ffa-review-bar__record {
    appearance: none;
    border: none;
    background: #c01818;
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease, transform 0.1s ease;
    min-width: 110px;
    justify-content: center;
}

.ffa-review-bar__record:hover { background: #d92020; }
.ffa-review-bar__record:active { transform: scale(0.97); }

.ffa-review-bar__record[data-state="recording"] {
    background: #fff;
    color: #c01818;
}

.ffa-review-bar__record[data-state="finalizing"] {
    background: #555;
    color: #fff;
    cursor: wait;
}

.ffa-review-bar__record-glyph {
    width: 12px;
    height: 12px;
    background: currentColor;
    border-radius: 50%;
}

.ffa-review-bar__record[data-state="recording"] .ffa-review-bar__record-glyph {
    border-radius: 2px;
}

@media (max-width: 600px) {
    .ffa-review-bar__inner { padding: 0 10px; gap: 8px; }
    .ffa-review-bar__surface { display: none; }
    .ffa-review-bar__status { font-size: calc(11px * var(--type-scale, 1)); }
    .ffa-review-bar__record { min-width: 84px; padding: 5px 10px; }
}
