/* VoiceBank — page styles
   ────────────────────────
   Scoped to .vb- prefix. Works on /voicebank standalone page.

   IMPORTANT: Studio's shared styles.css sets `body { overflow: hidden }`
   because /studio is a tabbed app where each tab manages its own scroll.
   Our /voicebank page is a normal single-flow page — override that
   constraint so the page can scroll vertically like a normal site.
*/

html, body {
    overflow: auto !important;
    overflow-x: hidden !important;     /* still hide horizontal */
    height: auto !important;
    min-height: 100vh;
}

body { background: var(--bg-primary, #0f1419); color: var(--text-primary, #e5e7eb); }

.vb-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* Hero */
.vb-hero { text-align: center; padding: 30px 0 50px; }
.vb-title {
    font-size: 56px;
    margin: 12px 0 8px;
    background: linear-gradient(90deg, #7c5cfc, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}
.vb-tagline { font-size: 20px; color: var(--text-primary, #e5e7eb); margin: 4px 0 16px; font-weight: 500; }
.vb-blurb { font-size: 15px; max-width: 700px; margin: 0 auto; color: var(--text-secondary, #cbd5e1); line-height: 1.6; }

/* Use case cards */
.vb-uses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 40px 0;
}
.vb-use-card {
    background: var(--bg-secondary, #1f2937);
    border: 1px solid var(--border-primary, #374151);
    border-radius: 10px;
    padding: 22px;
    text-align: center;
}
.vb-use-card h3 { margin: 8px 0; font-size: 18px; }
.vb-use-card p { font-size: 13px; color: var(--text-muted, #9ca3af); line-height: 1.55; margin: 0; }
.vb-icon { font-size: 36px; margin-bottom: 4px; }

@media (max-width: 760px) {
    .vb-uses { grid-template-columns: 1fr; }
    .vb-title { font-size: 40px; }
    .vb-tagline { font-size: 16px; }
}

/* App section */
.vb-app { margin-top: 30px; }
.vb-card {
    background: var(--bg-secondary, #1f2937);
    border: 1px solid var(--border-primary, #374151);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 18px;
}
.vb-card h2 { margin: 0 0 16px 0; font-size: 20px; }
.vb-help { font-size: 13px; color: var(--text-muted, #9ca3af); margin: 0 0 16px; }
.vb-muted { color: var(--text-muted, #9ca3af); font-size: 13px; }
.vb-err { color: #ef4444; font-size: 13px; }
.vb-ok { color: #10b981; font-size: 13px; }

/* Field rows */
.vb-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.vb-field span { color: var(--text-muted, #9ca3af); font-size: 13px; font-weight: 600; }
.vb-field input, .vb-field select, textarea {
    background: var(--bg-tertiary, #111827);
    border: 1px solid var(--border-primary, #374151);
    color: var(--text-primary, #e5e7eb);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

.vb-audio-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px;
    border: 2px dashed var(--border-primary, #374151);
    border-radius: 8px;
    margin-bottom: 14px;
}
.vb-file-label {
    flex: 1;
    color: var(--text-muted, #9ca3af);
    font-size: 13px;
    min-width: 160px;
}

.vb-consent {
    display: flex;
    gap: 10px;
    background: rgba(124, 92, 252, 0.08);
    border-left: 3px solid #7c5cfc;
    padding: 14px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.55;
}
.vb-consent input { margin-top: 4px; flex-shrink: 0; }
.vb-consent small { color: var(--text-muted, #9ca3af); display: block; margin-top: 6px; font-size: 11px; }
.vb-consent em { color: var(--text-primary, #e5e7eb); font-style: italic; }

.vb-submit { width: 100%; padding: 14px; font-size: 15px; font-weight: 600; }

.vb-status { margin-top: 12px; font-size: 13px; }

/* "Logged in as X" banner above the page */
.vb-auth-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(16, 185, 129, 0.10);
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 13px;
}
.vb-auth-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: vb-auth-pulse 2s ease-in-out infinite;
}
@keyframes vb-auth-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}
.vb-auth-banner strong { color: #10b981; }
.vb-auth-link { margin-left: auto; color: var(--text-muted, #9ca3af); text-decoration: none; }
.vb-auth-link:hover { color: white; }

.vb-cta-box {
    background: var(--bg-secondary, #1f2937);
    border: 1px solid var(--border-primary, #374151);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

/* Voices list */
.vb-list { display: flex; flex-direction: column; gap: 12px; }
.vb-empty { padding: 24px; text-align: center; color: var(--text-muted, #9ca3af); border: 1px dashed var(--border-primary, #374151); border-radius: 6px; }

.vb-voice {
    background: var(--bg-tertiary, #111827);
    border: 1px solid var(--border-primary, #374151);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}
.vb-voice-meta { min-width: 0; }
.vb-voice-title { font-weight: 600; margin-bottom: 4px; }
.vb-voice-sub { font-size: 12px; color: var(--text-muted, #9ca3af); }
.vb-voice-dedication { font-style: italic; font-size: 13px; color: var(--text-secondary, #cbd5e1); margin-top: 4px; }
.vb-voice-stats { font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 4px; }
.vb-voice-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.vb-del { color: #ef4444; }
.vb-audio { grid-column: 1 / -1; }
.vb-audio audio { width: 100%; margin-top: 8px; }

/* Recorder modal */
.vb-rec-status { text-align: center; font-size: 14px; }
.vb-rec-timer { text-align: center; font-size: 28px; font-weight: 700; margin: 8px 0; font-variant-numeric: tabular-nums; }

/* FAQ */
.vb-faq { margin-top: 40px; max-width: 800px; margin-left: auto; margin-right: auto; }
.vb-faq h2 { margin-bottom: 16px; }
.vb-faq details {
    background: var(--bg-secondary, #1f2937);
    border: 1px solid var(--border-primary, #374151);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.vb-faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
}
.vb-faq details[open] summary { color: #7c5cfc; }
.vb-faq p { font-size: 14px; color: var(--text-secondary, #cbd5e1); line-height: 1.6; margin: 10px 0 4px; }
