/**
 * Fast Dictate — live demo widget, styled after the desktop app onboarding
 * (LearnStep / overlay): dark pill with voice-reactive vertical bars, app-style
 * text zone, green ✓ success state. Shared by index.html (#try) and try.html.
 */

.fd-demo-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}
@media (min-width: 768px) {
    .fd-demo-card { padding: 2.5rem 3rem; }
}

/* --- Text zone, same look as the app's onboarding textarea --- */
.fd-textzone {
    width: 100%;
    min-height: 110px;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s ease;
    white-space: pre-wrap;
    margin-bottom: 20px;
    /* Anti-abus : le texte transcrit ne peut pas etre selectionne ni copie
       (la demo montre la qualite, elle ne sert pas d'outil de transcription). */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}
.fd-textzone.fd-recording { border-color: #1a1a1a; }
.fd-textzone.fd-done { border-color: #10b981; }
.fd-textzone.fd-error { border-color: #f87171; color: #b91c1c; }
.fd-textzone .fd-placeholder { color: #9ca3af; }

/* --- Big mic button (idle state) --- */
.fd-bigmic {
    width: 96px;
    height: 96px;
    border-radius: 9999px;
    background: #000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
    border: none;
    cursor: pointer;
}
.fd-bigmic:hover { background: #1f2937; transform: scale(1.05); }
.fd-bigmic svg { width: 40px; height: 40px; }

/* --- The pill: exact overlay styling from the app, larger --- */
.fd-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 30px;
    border-radius: 50px;
    background: rgba(26, 26, 26, 0.95);
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.2s ease, color 0.2s ease;
    min-height: 64px;
}
.fd-pill:hover { transform: scale(1.03); }
.fd-pill.fd-rec { cursor: default; }
.fd-pill.fd-rec:hover { transform: none; }

/* ✗ cancel / ✓ confirm inside the recording pill */
.fd-iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
}
.fd-iconbtn:hover { background: rgba(255, 255, 255, 0.12); }
.fd-iconbtn svg { width: 20px; height: 20px; }
.fd-cancel { color: rgba(255, 255, 255, 0.65); }
.fd-confirm { color: #34d399; }
.fd-pill.fd-done {
    background: #f9fafb;
    color: #10b981;
    border-color: #10b981;
    box-shadow: none;
    cursor: default;
}
.fd-pill.fd-done:hover { transform: none; }

/* Voice-reactive vertical bars (12 × 2px, white, like the app overlay) */
.fd-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 40px;
}
.fd-bars span {
    width: 3px;
    height: 5px;
    background: #ffffff;
    border-radius: 99px;
}

/* Spinner, same as the app's learn-spinner */
.fd-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: fd-spin 0.7s linear infinite;
}
@keyframes fd-spin { to { transform: rotate(360deg); } }

.fd-timer { font-variant-numeric: tabular-nums; opacity: 0.85; font-size: 16px; min-width: 38px; text-align: center; }
.fd-timer.fd-warn { color: #f87171; }

/* Recording dot in the idle pill */
.fd-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #ef4444;
}

.fd-hidden { display: none !important; }
