/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --secondary-color: #4a5568;
    --success-color: #38a169;
    --danger-color: #e53e3e;
    --warning-color: #d69e2e;
    --info-color: #3182ce;
    
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: white;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* Header and Footer */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand .court-seal-small {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    margin: 0;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
    color: white;
}

.privacy-notice {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* App Container */
.app-container {
    display: block;
}

/* App Layout - 3 Column */
.app-layout {
    display: grid;
    grid-template-columns: 300px 1fr 250px;
    min-height: auto;
    gap: 0;
}

/* Left Sidebar */
.sidebar {
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 1px;
}

/* Step List */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.step-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-item.completed {
    background: linear-gradient(135deg, var(--success-color), #48bb78);
    color: white;
    border-color: var(--success-color);
}

.step-item.error {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
    border-color: var(--danger-color);
    animation: pulse-error 2s infinite;
}

@keyframes pulse-error {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(229, 62, 62, 0.1);
    }
}

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

.step-number {
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.step-item.active .step-number {
    background: white;
    color: var(--primary-color);
}

.step-item.completed .step-number {
    background: var(--success-color);
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item.completed .step-number::before {
    content: '✓';
    font-size: 1rem;
    font-weight: 700;
}

.step-item.completed .step-number {
    font-size: 0;
}

.step-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.step-content {
    margin-top: 1rem;
}

.device-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.device-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.device-selector select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.device-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Level Indicators */
.level-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.level-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--success-color), #48bb78);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.level-fill.active {
    background: linear-gradient(90deg, var(--success-color), #48bb78);
}

.level-fill.recording {
    background: linear-gradient(90deg, var(--danger-color), #e53e3e);
    animation: pulse-level 1s infinite;
}

@keyframes pulse-level {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* PASS Indicator */
.pass-indicator {
    margin-top: 1rem;
    text-align: center;
}

.pass-text {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
}

/* Main Content */
.main-content {
    background: var(--bg-primary);
    padding: 2rem;
    min-height: auto;
}

/* Compact padding for results screen */
#resultsScreen .main-content {
    padding: 1rem 2rem;
}

.content-section {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-content {
    text-align: center;
    padding: 3rem 0;
}

.welcome-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Video Container */
.video-container {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.video-placeholder {
    width: 100%;
    height: 300px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.video-placeholder p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-container video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Audio Test Container */
.audio-test-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.waveform-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waveform-container div {
    width: 100%;
    height: 100px;
}

.audio-controls, .recording-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.recording-countdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.countdown-number {
    font-size: 1.2rem;
    font-weight: 700;
    animation: pulse-countdown 1s infinite;
}

@keyframes pulse-countdown {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Print Styles */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    html, body, .app-container {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    header, footer, .navbar, .sidebar, .troubleshooting-sidebar, .results-actions, .footer, 
    .app-container > footer, .app-container > header, 
    .navbar, .nav-container, .nav-brand, .brand-content,
    .footer, .footer .container, .footer p {
        display: none !important;
    }
    
    .app-layout {
        grid-template-columns: 1fr;
        display: block;
    }
    
    .main-content {
        padding: 0;
        max-width: none;
        width: 100%;
    }
    
    /* Hide any remaining footer elements */
    .app-container {
        display: block !important;
        background: white !important;
    }
    
    .app-container > *:not(.app-layout) {
        display: none !important;
    }
    
    .app-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
        background: white !important;
    }
    
    /* Force all elements to have white background */
    * {
        background: white !important;
    }
    
    .success-message, .device-summary, .disclaimer {
        background: white !important;
    }
    
    .success-message {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
        padding: 1rem;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .success-message h2 {
        color: #000 !important;
        margin: 0 0 0.5rem 0;
    }
    
    .success-message p {
        color: #000 !important;
        margin: 0;
    }
    
    .device-summary {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
        padding: 1rem;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .device-summary h3 {
        color: #000 !important;
        margin: 0 0 1rem 0;
    }
    
    .device-item {
        color: #000 !important;
        border: none !important;
        background: #fff !important;
        padding: 0.25rem 0;
    }
    
    .device-item strong {
        color: #000 !important;
    }
    
    .cms-guidance {
        color: #000 !important;
        background: #fff !important;
        border: none !important;
        padding: 0;
        margin-top: 1rem;
    }
    
    .cms-guidance h3 {
        color: #000 !important;
    }
    
    .cms-guidance p, .cms-guidance li {
        color: #000 !important;
    }
    
    /* Ensure single page */
    .content-section {
        page-break-inside: avoid;
    }
    
    /* Hide any remaining colored elements */
    .btn, .button-group {
        display: none !important;
    }
}

/* Test Prompts */
.test-prompt {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.test-prompt h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.test-prompt p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.audio-text {
    font-style: italic;
    color: var(--text-primary);
    font-weight: 500;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #2f855a;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #2d3748;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Results Screen */
.success-message {
    text-align: center;
    padding: 0.75rem 0;
    background: linear-gradient(135deg, var(--success-color), #48bb78);
    color: white;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

/* Results Screen - Very compact layout */
#resultsScreen {
    min-height: auto;
    max-height: none;
}

#resultsScreen .success-message {
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

#resultsScreen .success-message h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

#resultsScreen .success-message p {
    font-size: 0.9rem;
}

#resultsScreen .device-summary {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

#resultsScreen .device-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#resultsScreen .device-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
}

#resultsScreen .results-actions {
    margin-bottom: 0.75rem;
}

#resultsScreen .disclaimer {
    margin: 0.75rem 0;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.success-message h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.device-summary {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.device-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1.5rem 0;
}

.disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.875rem;
    line-height: 1.4;
}

.disclaimer strong {
    color: #856404;
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Troubleshooting Sidebar */
.troubleshooting-sidebar {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.troubleshooting-sidebar h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.troubleshooting-content {
    font-size: 0.875rem;
    line-height: 1.6;
}

.troubleshooting-content h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.troubleshooting-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.troubleshooting-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Browser Check */
.browser-check {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Permission Overlay */
.permission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.permission-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.permission-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: start;
}

.permission-left .device-setup-notice {
    margin-top: 0;
}

.permission-left {
    text-align: left;
}

.permission-right {
    text-align: left;
}

.permission-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.permission-header .court-seal-small {
    width: 60px;
    height: 60px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 54, 93, 0.1);
    flex-shrink: 0;
    overflow: hidden;
}

.seal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.permission-header .seal-text-small {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.1;
}

.permission-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.permission-body h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.permission-body p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.permission-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.status-icon {
    font-size: 1.5rem;
}

.status-text {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-indicator.loading {
    background: var(--warning-color);
    color: white;
    animation: pulse 1.5s infinite;
}

.status-indicator.success {
    background: var(--success-color);
    color: white;
}

.status-indicator.error {
    background: var(--danger-color);
    color: white;
}

.permission-message {
    margin-bottom: 1.5rem;
}

.permission-message p {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.permission-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.permission-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.privacy-notice {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

.device-setup-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.device-setup-notice h4 {
    color: #856404;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.device-setup-notice p {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.device-setup-notice ul {
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.device-setup-notice li {
    color: #856404;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.alert {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    margin: 2rem;
    box-shadow: var(--shadow-lg);
}

.alert-warning {
    border-color: var(--warning-color);
}

.alert h3 {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.alert ul {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.alert li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .app-layout {
        grid-template-columns: 250px 1fr 200px;
    }
}

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .sidebar {
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    
    .troubleshooting-sidebar {
        order: 3;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .main-content {
        order: 1;
    }
    
    .step-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
    }
    
    .step-item {
        min-width: 200px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .permission-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .permission-content {
        max-width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .sidebar, .troubleshooting-sidebar {
        padding: 1rem;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    .permission-content {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Waveform Styling */
.waveform-container .wavesurfer-container {
    width: 100%;
    height: 100px;
}

.waveform-container .wavesurfer-container canvas {
    width: 100% !important;
    height: 100px !important;
}

/* Recording Status */
.recording-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.recording-status.recording {
    color: var(--danger-color);
    font-weight: 500;
}

.recording-status.recording::before {
    content: '●';
    color: var(--danger-color);
    margin-right: 0.5rem;
    animation: pulse 1s infinite;
}

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