/* --- Base & Variables --- */
:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --primary-light: #f1f5f9;
    --secondary: #64748b;
    /* Slate */
    --accent: #3b82f6;
    /* Electric Blue Action */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --container-padding: 1.5rem;

    --text-main: #0f172a;
    --text-muted: #475569;

    --radius-xl: 12px;
    --radius-lg: 8px;
    --radius-md: 4px;

    --shadow-soft: none;
    --shadow-card: none;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Layout & Components --- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main) !important;
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
    min-height: 100vh;
}

/* Removed background image as per user request to move portrait to header */

h1,
h2,
h3,
h4 {
    font-family: inherit;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.h6 {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.bg-main {
    background-color: var(--bg-main);
}

/* Utility */
.rounded-3 {
    border-radius: var(--radius-lg) !important;
}

/* Dashboard-style Cards */
.dashboard-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.dashboard-card:hover {
    border-color: #cbd5e1;
}

@media (max-width: 1200px) {
    .dashboard-card {
        padding: 1.5rem;
    }
}

/* Transcription History bubbles */
.transcription-bubble {
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

.transcription-bubble:first-child {
    background: #f8fafc;
    border-color: #cbd5e1;
    font-weight: 500;
}

.transcription-bubble .attempt-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Form Styles */
.rounded-pill-start {
    border-radius: 8px 0 0 8px !important;
}

.btn-primary-dashboard {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.btn-primary-dashboard:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

.btn-danger-dashboard {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.btn-danger-dashboard:hover {
    background: var(--danger);
    color: white;
}

.btn-danger-dashboard.recording,
#record-btn.recording {
    background: #000000 !important;
    border-color: #000000 !important;
    animation: none !important;
}

@keyframes pulse-red-lite {
    0% {
        background: #dc2626;
    }

    50% {
        background: #ef4444;
    }

    100% {
        background: #dc2626;
    }
}

.rounded-4,
.rounded-3,
.rounded-2,
.rounded {
    border-radius: 8px !important;
}

/* Adjust validation btn if record button is present */
#validate-notion-btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    /*background: #ffffff;*/
    border: 1px solid #e2e8f0;
    border-left: none;
    /*color: var(--primary);*/
    padding: 0 1rem;
}

#validate-notion-btn:hover {
    background: var(--success);
    opacity: 0.9;
}

.form-control {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Wavesurfer */
#mic-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#playback-waveform {
    background: #f8fafc;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Tables Custom Style */
.table thead th {
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-bottom: 0.75rem;
}

.table td {
    padding: 0.75rem;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Score Colors */
.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Countdown */
#countdown-timer {
    font-variant-numeric: tabular-nums;
    color: var(--primary) !important;
}

#invitation-message {
    line-height: 1.4;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Animations removed as per user request */

/* --- Plyr Custom Styling (Dashboard) --- */
.audio-player-wrapper .plyr--audio {
    background: transparent;
    --plyr-color-main: var(--accent);
    --plyr-audio-controls-background: transparent;
    --plyr-audio-control-color: var(--text-muted);
}

.audio-player-wrapper .plyr--audio .plyr__controls {
    padding: 0;
    background: transparent;
}

#playback-container .plyr__volume {
    max-width: 80px;
}

#playback-container .plyr__time {
    font-size: 0.75rem;
}