/* Recording Device Rows */
.recording-device-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.recording-device-label {
    width: 90px;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.recording-device-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.recording-device-select {
    flex: 1;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
}


/* Test Level Meter (inline vertical bar) */
.test-level-meter {
    width: 8px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    flex-shrink: 0;
}

.test-level-fill {
    width: 100%;
    height: 0%;
    border-radius: var(--radius-sm);
    transition: height 0.08s linear;
    will-change: height;
    background: linear-gradient(0deg, #34C759 0%, #34C759 60%, #FFD60A 80%, #FF3B30 100%);
}

.test-cancel-btn {
    flex-shrink: 0;
    font-size: var(--font-size-xs);
    padding: 4px 8px;
}

/* Test Recording */
.test-recording-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.test-record-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
}

.test-record-btn.hidden,
.test-progress.hidden,
.test-playback.hidden {
    display: none;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    min-width: 200px;
}

.test-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.test-progress-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    width: 0%;
    background: var(--accent-blue);
    transition: width var(--duration-slow) linear;
}

.test-progress-text {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    white-space: nowrap;
}

.test-playback {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.test-playback audio {
    flex: 1;
    height: 32px;
    max-width: 300px;
}

/* Storage */
.storage-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.storage-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.storage-toggle-info strong {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.storage-toggle-desc {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.storage-folder-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-3);
    margin-bottom: var(--space-2);
}

.local-folder-picker {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.local-folder-picker.hidden {
    display: none;
}

.folder-path-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-path-label {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    white-space: nowrap;
}

.folder-path-value {
    flex: 1;
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tab Health Dot (badge on tab button) */
.tab-health-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-circle);
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
}

.tab-health-dot.amber {
    background: var(--color-amber);
}

.tab-health-dot.red {
    background: var(--color-red);
}

/* Dark mode overrides */
[data-theme="dark"] .permission-card,
[data-theme="dark"] .recording-readiness-bar {
    border-color: var(--border-light);
}

[data-theme="dark"] .recording-device-select {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

[data-theme="dark"] .local-folder-picker {
    background: var(--bg-tertiary);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .permission-card,
    :root:not([data-theme="light"]) .recording-readiness-bar {
        border-color: var(--border-light);
    }

    :root:not([data-theme="light"]) .recording-device-select {
        background: var(--bg-secondary);
        border-color: var(--border-light);
    }

    :root:not([data-theme="light"]) .local-folder-picker {
        background: var(--bg-tertiary);
    }
}

/* Calendar date picker dark mode */
[data-theme="dark"] .calendar-day {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .calendar-day:not(.empty):hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .calendar-day.past {
    color: var(--text-tertiary);
}

[data-theme="dark"] .calendar-day.selected {
    background: var(--accent-fill);
    color: white;
}

[data-theme="dark"] .calendar-nav-btn,
[data-theme="dark"] .quick-select-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

[data-theme="dark"] .calendar-nav-btn:hover,
[data-theme="dark"] .quick-select-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .datetime-date-input,
[data-theme="dark"] .datetime-time-input {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .calendar-day {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    :root:not([data-theme="light"]) .calendar-day:not(.empty):hover {
        background: var(--bg-tertiary);
    }

    :root:not([data-theme="light"]) .calendar-day.past {
        color: var(--text-tertiary);
    }

    :root:not([data-theme="light"]) .calendar-day.selected {
        background: var(--accent-fill);
        color: white;
    }

    :root:not([data-theme="light"]) .calendar-nav-btn,
    :root:not([data-theme="light"]) .quick-select-btn {
        background: var(--bg-secondary);
        color: var(--text-secondary);
    }

    :root:not([data-theme="light"]) .calendar-nav-btn:hover,
    :root:not([data-theme="light"]) .quick-select-btn:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    :root:not([data-theme="light"]) .datetime-date-input,
    :root:not([data-theme="light"]) .datetime-time-input {
        background: var(--bg-secondary);
        color: var(--text-primary);
        border-color: var(--border-medium);
    }
}

/* ============================================================================
   END RECORDING SETTINGS TAB
   ============================================================================ */
