/* ============================================
   MIC CHECK SECTION - The Gauntlet
   ============================================ */

.mic-check-section {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.8) 0%, rgba(5, 5, 5, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.mic-check-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.5) 50%, 
        transparent 100%
    );
}

.mic-check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mic-check-header h6 {
    margin: 0;
    font-family: var(--font-display, 'Clash Display', sans-serif);
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.mic-check-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.mic-check-status.complete {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* Steps */
.mic-check-step {
    margin-bottom: 1.25rem;
}

.mic-check-step:last-of-type {
    margin-bottom: 0;
}

.mic-check-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mic-check-step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.mic-check-step.completed .mic-check-step-number {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.mic-check-step.completed .mic-check-step-number::after {
    content: "✓";
}

.mic-check-step-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.mic-check-step-content {
    padding-left: 2.25rem;
}

/* Device Select */
.mic-check-step-content select {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.mic-check-step-content select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.mic-check-step-content select:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Level Bar */
.mic-check-level-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mic-check-level-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #10b981 50%,
        #f59e0b 75%,
        #ef4444 100%
    );
    border-radius: 4px;
    transition: width 0.05s ease-out;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.mic-check-level-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mic-check-level-hint.active {
    color: var(--accent-success);
}

.mic-check-level-hint.active i {
    animation: pulse 1s infinite;
}

/* Instruction Text */
.mic-check-instruction {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Record Controls */
.mic-check-record-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mic-check-record-btn,
.mic-check-stop-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.mic-check-record-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.mic-check-record-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.25);
}

.mic-check-record-btn i {
    color: #ef4444;
    animation: pulse 2s ease-in-out infinite;
}

.mic-check-stop-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.mic-check-stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.mic-check-recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-danger);
    font-weight: 500;
}

/* Confirm Buttons */
.mic-check-confirm-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Mic Check Complete State */
.mic-check-complete {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.mic-check-complete > i {
    font-size: 2.5rem;
    color: #10b981;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.mic-check-complete div {
    flex: 1;
}

.mic-check-complete strong {
    color: #10b981;
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.mic-check-complete p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Recording Section States */
.recording-section-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.5) 0%, rgba(5, 5, 5, 0.5) 100%);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    font-weight: 500;
}

.recording-section-locked i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.recording-section-unlocked {
    animation: unlockReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes unlockReveal {
    from { 
        opacity: 0; 
        transform: translateY(-10px) scale(0.98);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   AUDIO SETTINGS MODAL (Keep for future use)
   ============================================ */

.audio-settings-modal .modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.audio-settings-modal .modal-header {
    border-bottom: 1px solid var(--border-default);
    padding: 1.25rem 1.5rem;
}

.audio-settings-modal .modal-body {
    padding: 1.5rem;
}

.audio-settings-modal .modal-footer {
    border-top: 1px solid var(--border-default);
    padding: 1rem 1.5rem;
}

/* Device Selector */
.audio-device-selector {
    margin-bottom: 1.5rem;
}

.audio-device-selector label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.audio-device-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.audio-device-selector select:hover {
    border-color: var(--accent-primary);
}

.audio-device-selector select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.audio-device-selector select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Permission Status */
.audio-permission-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.audio-permission-status.granted {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--accent-success);
}

.audio-permission-status.denied {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--accent-danger);
}

.audio-permission-status.pending {
    background: rgba(210, 168, 61, 0.1);
    border: 1px solid rgba(210, 168, 61, 0.3);
    color: var(--accent-warning);
}

.audio-permission-status i {
    font-size: 1.1rem;
}

/* Audio Level Meter Container */
.audio-level-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.audio-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.audio-level-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.audio-level-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Audio Level Meter Bar */
.audio-level-meter {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.audio-level-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--accent-success) 0%, 
        var(--accent-success) 60%,
        var(--accent-warning) 80%,
        var(--accent-danger) 100%
    );
    border-radius: 6px;
    transition: width 0.05s ease-out;
}

/* Level Indicators */
.audio-level-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0 2px;
}

.audio-level-indicators span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Waveform Visualizer */
.audio-waveform-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.audio-waveform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.audio-waveform-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.audio-waveform {
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 8px;
}

.audio-waveform-bar {
    width: 3px;
    min-height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: height 0.05s ease-out;
}

.audio-waveform-bar.active {
    background: linear-gradient(180deg, var(--accent-primary) 0%, #a371f7 100%);
}

/* No Audio State */
.audio-no-signal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.audio-no-signal i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Test Button */
.audio-test-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-test-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.audio-test-btn.testing {
    background: rgba(248, 81, 73, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.audio-test-btn.testing i {
    animation: pulse 1s infinite;
}

/* Device Info */
.audio-device-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.audio-device-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-muted);
}

.audio-device-info-row:last-child {
    border-bottom: none;
}

.audio-device-info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.audio-device-info-value {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Settings Button in Nav */
.audio-settings-nav-btn {
    position: relative;
}

.audio-settings-nav-btn .audio-indicator {
    position: absolute;
    top: 50%;
    right: -2px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-success);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.audio-settings-nav-btn.has-audio .audio-indicator {
    opacity: 1;
    animation: pulse 2s infinite;
}

/* Inline Audio Settings (for create/respond forms) */
.audio-settings-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.audio-settings-inline-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.audio-settings-inline-info {
    flex: 1;
    min-width: 0;
}

.audio-settings-inline-device {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-settings-inline-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.audio-settings-inline-meter {
    width: 60px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.audio-settings-inline-meter-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-success);
    border-radius: 3px;
    transition: width 0.05s ease-out;
}

.audio-settings-inline-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-settings-inline-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Loading State */
.audio-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.audio-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Error State */
.audio-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.audio-error i {
    font-size: 2rem;
    color: var(--accent-danger);
    margin-bottom: 0.75rem;
}

.audio-error h6 {
    color: var(--accent-danger);
    margin-bottom: 0.5rem;
}

.audio-error p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes audioWave {
    0%, 100% {
        transform: scaleY(0.3);
    }
    50% {
        transform: scaleY(1);
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .audio-settings-modal .modal-body {
        padding: 1rem;
    }
    
    .audio-level-container,
    .audio-waveform-container {
        padding: 1rem;
    }
    
    .audio-settings-inline {
        flex-wrap: wrap;
    }
    
    .audio-settings-inline-meter {
        order: 4;
        width: 100%;
        margin-top: 0.5rem;
    }
}

