/* EasyToolio Microphone Test Custom Styling - Professional Audio Diagnostic */

/* Adaptive Canvas Surface */
.mic-visualizer-container {
    position: relative;
    width: 100%;
    height: 230px;
    background: #f8fafc;
    background-image: 
        radial-gradient(#cbd5e1 1px, transparent 1px), 
        radial-gradient(#cbd5e1 1px, #f8fafc 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03), 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.dark .mic-visualizer-container {
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, rgba(3, 7, 18, 0.98) 100%);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
}

.mic-visualizer-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Status Badges */
.diagnostic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.badge-pass, .badge-detected {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.dark .badge-pass, .dark .badge-detected {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warn, .badge-pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.dark .badge-warn, .dark .badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-unsupported, .badge-not-exposed {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.dark .badge-unsupported, .dark .badge-not-exposed {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-fail {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.dark .badge-fail {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-blocked {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.dark .badge-blocked {
    background: rgba(234, 88, 12, 0.15);
    color: #fb923c;
    border: 1px solid rgba(234, 88, 12, 0.3);
}

/* Permission Help Container */
.permission-help-panel {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}


/* Pipeline Step Navigation Bar */
.pipeline-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.5rem;
    border-radius: 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    min-height: 38px;
}

.pipeline-step:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.dark .pipeline-step {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark .pipeline-step:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.pipeline-step.active {
    background: #06b6d4 !important;
    color: #042f2e !important;
    border-color: #0891b2 !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    font-weight: 900;
}

.pipeline-step.passed-step {
    border-color: #10b981;
    color: #059669;
}

.dark .pipeline-step.passed-step {
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Volume Track & Meter Bars */
.mic-level-track {
    height: 16px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    border: 1px solid #cbd5e1;
}

.dark .mic-level-track {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mic-level-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #f59e0b 80%, #ef4444 100%);
    transition: width 0.04s ease-out;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Peak Indicator Line */
.mic-peak-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.5px;
    background: #ef4444;
    box-shadow: 0 0 5px #ef4444;
    transition: left 0.1s ease-out;
    z-index: 5;
}

/* Stereo Channel Meters */
.stereo-channel-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.dark .stereo-channel-bar {
    background: rgba(255, 255, 255, 0.08);
}

.stereo-channel-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
    transition: width 0.04s ease-out;
}

/* Frequency Energy Bars */
.freq-band-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.dark .freq-band-bar {
    background: rgba(255, 255, 255, 0.08);
}

.freq-band-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
    transition: width 0.05s ease-out;
}

/* Pulsing Recording Indicator */
@keyframes mic-record-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.mic-recording-active {
    animation: mic-record-pulse 1.2s infinite ease-in-out;
}

/* Touch Targets & Responsiveness */
.touch-target {
    min-height: 38px;
}

@media (max-width: 640px) {
    .mic-visualizer-container {
        height: 190px;
    }
}
