/**
 * Voice Demo Widget Styles
 * Centered layout with audio bar visualizer, improved transcript, and bottom controls
 */

/* ==========================================================================
   Modal Overlay & Container
   ========================================================================== */

.voice-demo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    overflow: hidden;
}

.voice-demo-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when modal is open */
body.voice-demo-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.voice-demo-modal {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 900px;
    max-height: 90vh;
    margin: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.voice-demo-overlay.active .voice-demo-modal {
    transform: translateY(0);
}

/* Close button */
.voice-demo-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.voice-demo-close:hover {
    background: var(--bg-elevated);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.voice-demo-close svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Provider Toggle
   ========================================================================== */

.voice-demo-header {
    display: flex;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    padding-bottom: 0;
    flex-shrink: 0;
}

.voice-demo-provider-toggle {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.voice-demo-provider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-xl);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-provider:hover:not(.active):not(:disabled) {
    background: var(--bg-elevated);
}

.voice-demo-provider.active {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.voice-demo-provider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-demo-provider-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.voice-demo-provider.active .voice-demo-provider-name {
    color: var(--accent-primary);
}

.voice-demo-provider-desc {
    font-size: 0.6875rem;
    color: var(--text-tertiary, #71717a);
}

/* ==========================================================================
   Agent Tabs
   ========================================================================== */

.voice-demo-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}

.voice-demo-tabs::-webkit-scrollbar {
    display: none;
}

.voice-demo-tab {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.voice-demo-tab:hover:not(.active):not(:disabled) {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
}

.voice-demo-tab.active {
    background: rgba(212, 165, 48, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(212, 165, 48, 0.15);
}

.voice-demo-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-demo-tab-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 4px;
}

/* Show full name by default, hide short name */
.voice-demo-tab-name-full {
    display: inline;
}

.voice-demo-tab-name-short {
    display: none;
}

.voice-demo-tab.active .voice-demo-tab-name {
    color: var(--accent-primary);
}

.voice-demo-tab-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary, #71717a);
    line-height: 1.4;
}

/* ==========================================================================
   Main Content Area - Centered Layout
   ========================================================================== */

.voice-demo-content-centered {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.voice-demo-main {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

/* ==========================================================================
   Audio Bar Visualizer
   ========================================================================== */

.voice-demo-audio-visualizer {
    position: relative;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-demo-visualizer-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 100% at 50% 100%,
        rgba(212, 165, 48, 0.15) 0%,
        transparent 70%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.voice-demo-overlay[data-status="connected"] .voice-demo-visualizer-glow {
    opacity: 1;
}

.voice-demo-overlay:not([data-status="connected"]) .voice-demo-visualizer-glow {
    opacity: 0.3;
}

.voice-demo-bars-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 100%;
    padding: var(--space-sm) 0;
}

.voice-demo-bar {
    --bar-height: 20%;
    width: 6px;
    height: var(--bar-height);
    min-height: 8px;
    background: linear-gradient(
        to top,
        var(--accent-primary) 0%,
        var(--accent-light) 100%
    );
    border-radius: 3px;
    transition: height 0.08s ease-out;
    opacity: 0.6;
}

/* State-based bar colors */
.voice-demo-bars-container[data-state="listening"] .voice-demo-bar {
    background: linear-gradient(
        to top,
        #22c55e 0%,
        #4ade80 100%
    );
    opacity: 0.85;
}

.voice-demo-bars-container[data-state="thinking"] .voice-demo-bar {
    background: linear-gradient(
        to top,
        var(--accent-primary) 0%,
        var(--accent-light) 100%
    );
    opacity: 0.85;
    animation: bar-pulse 0.8s ease-in-out infinite alternate;
}

.voice-demo-bars-container[data-state="speaking"] .voice-demo-bar {
    background: linear-gradient(
        to top,
        #3b82f6 0%,
        #60a5fa 100%
    );
    opacity: 0.9;
}

@keyframes bar-pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Status indicator */
.voice-demo-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono, 'SF Mono', 'Consolas', monospace);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary, #71717a);
    flex-shrink: 0;
}

.voice-demo-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary, #71717a);
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.voice-demo-status[data-state="listening"] .voice-demo-status-dot {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.voice-demo-status[data-state="thinking"] .voice-demo-status-dot {
    background: var(--accent-primary);
    animation: pulse 1s ease-in-out infinite;
}

.voice-demo-status[data-state="speaking"] .voice-demo-status-dot {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* ==========================================================================
   Transcript Panel - Improved Design
   ========================================================================== */

.voice-demo-transcript-panel {
    width: 100%;
    flex: 1;
    min-height: 200px;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        var(--bg-tertiary) 0%,
        rgba(24, 24, 27, 0.8) 100%
    );
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.voice-demo-transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.voice-demo-transcript-label {
    font-family: var(--font-mono, 'SF Mono', 'Consolas', monospace);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary, #71717a);
}

.voice-demo-transcript-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.voice-demo-transcript-indicator .indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary, #71717a);
    transition: all 0.3s ease;
}

.voice-demo-overlay[data-status="connected"] .voice-demo-transcript-indicator .indicator-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: indicator-pulse 2s ease-in-out infinite;
}

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

.voice-demo-transcript-panel .voice-demo-transcript-scroll {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) var(--space-lg);
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.voice-demo-transcript-panel .voice-demo-transcript-scroll::-webkit-scrollbar {
    width: 6px;
}

.voice-demo-transcript-panel .voice-demo-transcript-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.voice-demo-transcript-panel .voice-demo-transcript-scroll::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.voice-demo-transcript-panel .voice-demo-transcript-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* Empty state */
.voice-demo-transcript-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    height: 100%;
    min-height: 120px;
    color: var(--text-tertiary, #71717a);
    text-align: center;
}

.voice-demo-transcript-empty .empty-icon {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

.voice-demo-transcript-empty span {
    font-family: var(--font-body);
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Transcript entries */
.voice-demo-transcript-entry {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    animation: entry-fade-in 0.3s ease-out;
}

@keyframes entry-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-demo-transcript-entry:last-child {
    margin-bottom: 0;
}

.voice-demo-transcript-speaker {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono, 'SF Mono', 'Consolas', monospace);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    margin-top: 2px;
}

.voice-demo-transcript-speaker.agent {
    background: linear-gradient(135deg, rgba(212, 165, 48, 0.2) 0%, rgba(212, 165, 48, 0.1) 100%);
    color: var(--accent-primary);
    border: 1px solid rgba(212, 165, 48, 0.3);
}

.voice-demo-transcript-speaker.user {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.voice-demo-transcript-text {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-primary);
}

/* Speaking entry highlight */
.voice-demo-transcript-entry.speaking {
    position: relative;
}

.voice-demo-transcript-entry.speaking .voice-demo-transcript-speaker.agent {
    animation: speaker-glow 1.5s ease-in-out infinite;
}

@keyframes speaker-glow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(212, 165, 48, 0);
    }
    50% {
        box-shadow: 0 0 12px rgba(212, 165, 48, 0.4);
    }
}

/* ==========================================================================
   Word-by-Word Highlighting
   ========================================================================== */

.voice-demo-word {
    color: var(--text-tertiary, #71717a);
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.voice-demo-word.highlighted {
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(212, 165, 48, 0.4);
}

.voice-demo-word.spoken {
    color: var(--text-primary);
}

/* ==========================================================================
   Bottom Controls
   ========================================================================== */

.voice-demo-controls-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) 0 var(--space-sm);
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-sm);
}

.voice-demo-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-2xl);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.voice-demo-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 165, 48, 0.4);
}

.voice-demo-start:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.voice-demo-start svg {
    width: 20px;
    height: 20px;
}

/* Mic and End buttons (shown when connected) */
.voice-demo-btn-group {
    display: none;
    align-items: center;
    gap: var(--space-lg);
}

.voice-demo-overlay[data-status="connected"] .voice-demo-start {
    display: none;
}

.voice-demo-overlay[data-status="connected"] .voice-demo-btn-group {
    display: flex;
}

.voice-demo-mic,
.voice-demo-end {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-mic {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.voice-demo-mic:hover {
    background: var(--bg-elevated);
    border-color: #22c55e;
    color: #22c55e;
}

.voice-demo-mic.muted {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.voice-demo-end {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.voice-demo-end:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.voice-demo-mic svg,
.voice-demo-end svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Loading & Error States
   ========================================================================== */

.voice-demo-overlay[data-status="connecting"] .voice-demo-start {
    pointer-events: none;
}

.voice-demo-overlay[data-status="connecting"] .voice-demo-start::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: var(--space-sm);
}

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

.voice-demo-error {
    display: none;
    width: 100%;
    padding: var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 0.875rem;
    text-align: center;
}

.voice-demo-overlay[data-status="error"] .voice-demo-error {
    display: block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .voice-demo-modal {
        margin: 0;
        border-radius: 0;
        max-height: none;
        height: 100%;
    }

    .voice-demo-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        padding: var(--space-md);
        overflow-x: visible;
    }

    .voice-demo-tab {
        min-width: 0;
        max-width: none;
        flex: none;
        padding: var(--space-sm) var(--space-sm);
        min-height: 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .voice-demo-tab-name {
        font-size: 0.6875rem;
        letter-spacing: 0.08em;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Show short names on mobile for better fit */
    .voice-demo-tab-name-full {
        display: none;
    }

    .voice-demo-tab-name-short {
        display: inline;
    }

    .voice-demo-tab-desc {
        display: none;
    }

    .voice-demo-content-centered {
        padding: var(--space-md);
    }

    .voice-demo-audio-visualizer {
        height: 80px;
    }

    .voice-demo-bar {
        width: 4px;
    }

    .voice-demo-bars-container {
        gap: 3px;
    }

    .voice-demo-transcript-panel {
        min-height: 180px;
        max-height: 300px;
    }

    .voice-demo-transcript-panel .voice-demo-transcript-scroll {
        padding: var(--space-sm) var(--space-md);
    }

    .voice-demo-transcript-text {
        font-size: 0.875rem;
    }

    .voice-demo-transcript-speaker {
        width: 28px;
        height: 28px;
        font-size: 0.5625rem;
    }

    .voice-demo-mic,
    .voice-demo-end {
        width: 50px;
        height: 50px;
    }

    .voice-demo-mic svg,
    .voice-demo-end svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .voice-demo-close {
        top: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
    }

    .voice-demo-tabs {
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
    }

    .voice-demo-tab {
        padding: var(--space-xs) var(--space-sm);
        min-height: 44px;
        border-radius: var(--radius-sm);
    }

    .voice-demo-audio-visualizer {
        height: 70px;
    }

    .voice-demo-bar {
        width: 3px;
    }

    .voice-demo-bars-container {
        gap: 2px;
    }

    .voice-demo-start {
        padding: var(--space-sm) var(--space-xl);
        font-size: 0.875rem;
    }

    .voice-demo-btn-group {
        gap: var(--space-md);
    }
}

/* Extra small screens - keep 2x2 grid but tighten spacing */
@media (max-width: 360px) {
    .voice-demo-tabs {
        gap: 6px;
        padding: var(--space-xs) var(--space-sm);
    }

    .voice-demo-tab {
        min-height: 40px;
        padding: var(--space-xs);
    }

    .voice-demo-tab-name {
        font-size: 0.625rem;
        letter-spacing: 0.04em;
    }
}

/* ==========================================================================
   Light Theme Adjustments
   ========================================================================== */

[data-theme="light"] .voice-demo-overlay {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .voice-demo-modal {
    background: var(--bg-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .voice-demo-tab.active {
    background: rgba(180, 130, 20, 0.1);
}

[data-theme="light"] .voice-demo-start {
    color: white;
}

[data-theme="light"] .voice-demo-transcript-panel {
    background: linear-gradient(
        180deg,
        var(--bg-secondary) 0%,
        var(--bg-primary) 100%
    );
}

[data-theme="light"] .voice-demo-word {
    color: var(--text-tertiary);
}

[data-theme="light"] .voice-demo-word.spoken {
    color: var(--text-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .voice-demo-overlay,
    .voice-demo-modal,
    .voice-demo-status-dot,
    .voice-demo-bar,
    .voice-demo-word,
    .voice-demo-transcript-entry {
        transition: none;
        animation: none;
    }
}

/* ==========================================================================
   Settings Button & Modal
   ========================================================================== */

/* Start button group */
.voice-demo-start-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.voice-demo-settings-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-settings-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.voice-demo-settings-btn svg {
    width: 20px;
    height: 20px;
}

/* Hide settings button when connected */
.voice-demo-overlay[data-status="connected"] .voice-demo-start-group {
    display: none;
}

/* Settings Modal Overlay */
.voice-demo-settings-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: 100;
    border-radius: var(--radius-xl);
}

.voice-demo-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Settings Content Box */
.voice-demo-settings-content {
    width: 90%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: translateY(10px);
    transition: transform var(--transition-base);
}

.voice-demo-settings-modal.active .voice-demo-settings-content {
    transform: translateY(0);
}

/* Settings Header */
.voice-demo-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.voice-demo-settings-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.voice-demo-settings-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-settings-close:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.voice-demo-settings-close svg {
    width: 18px;
    height: 18px;
}

/* Settings Body */
.voice-demo-settings-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Settings Group */
.voice-demo-settings-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.voice-demo-settings-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Voice Select */
.voice-demo-settings-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    padding-right: var(--space-2xl);
}

.voice-demo-settings-select:hover {
    border-color: var(--border-strong);
}

.voice-demo-settings-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 48, 0.15);
}

.voice-demo-settings-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Intro Mode Options */
.voice-demo-intro-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.voice-demo-intro-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-intro-option:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
}

.voice-demo-intro-option.selected {
    background: rgba(212, 165, 48, 0.1);
    border-color: var(--accent-primary);
}

.voice-demo-intro-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.voice-demo-intro-option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-demo-intro-option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.voice-demo-intro-option.selected .voice-demo-intro-option-name {
    color: var(--accent-primary);
}

.voice-demo-intro-option-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Settings Footer */
.voice-demo-settings-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    display: flex;
    justify-content: flex-end;
}

.voice-demo-settings-done {
    padding: var(--space-sm) var(--space-xl);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-demo-settings-done:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(212, 165, 48, 0.3);
}

/* Responsive Settings */
@media (max-width: 480px) {
    .voice-demo-settings-content {
        width: 95%;
        max-width: none;
    }

    .voice-demo-settings-body {
        padding: var(--space-md);
    }

    .voice-demo-start-group {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .voice-demo-settings-btn {
        width: 100%;
        border-radius: var(--radius-md);
        gap: var(--space-sm);
    }

    .voice-demo-settings-btn::after {
        content: 'Settings';
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Exit Intent CTA Modal
   ========================================================================== */

.voice-demo-exit-cta {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 200;
    border-radius: var(--radius-xl);
}

.voice-demo-exit-cta.active {
    opacity: 1;
    visibility: visible;
}

.voice-demo-exit-cta-content {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(
        165deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 100%
    );
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(212, 165, 48, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.voice-demo-exit-cta.active .voice-demo-exit-cta-content {
    transform: translateY(0) scale(1);
}

/* Header with icon */
.voice-demo-exit-cta-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.voice-demo-exit-cta-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(212, 165, 48, 0.15) 0%,
        rgba(212, 165, 48, 0.05) 100%
    );
    border: 1px solid rgba(212, 165, 48, 0.3);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
}

.voice-demo-exit-cta-icon svg {
    width: 32px;
    height: 32px;
}

.voice-demo-exit-cta-title {
    margin: 0;
    font-family: var(--font-heading, 'Fraunces', serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Description */
.voice-demo-exit-cta-description {
    margin: 0 0 var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.voice-demo-exit-cta-agent {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: capitalize;
}

/* Benefits list */
.voice-demo-exit-cta-benefits {
    list-style: none;
    margin: 0 0 var(--space-xl);
    padding: 0;
    text-align: left;
}

.voice-demo-exit-cta-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.voice-demo-exit-cta-benefits li svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: #22c55e;
}

/* Actions */
.voice-demo-exit-cta-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.voice-demo-exit-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary, #c9962d) 100%
    );
    border: none;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 15px rgba(212, 165, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.voice-demo-exit-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(212, 165, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.voice-demo-exit-cta-primary:active {
    transform: translateY(0);
}

.voice-demo-exit-cta-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.voice-demo-exit-cta-primary:hover svg {
    transform: translateX(3px);
}

.voice-demo-exit-cta-secondary {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.voice-demo-exit-cta-secondary:hover {
    color: var(--text-secondary);
}

/* Trust line */
.voice-demo-exit-cta-trust {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* Responsive Exit CTA */
@media (max-width: 768px) {
    .voice-demo-exit-cta {
        padding: var(--space-md);
    }

    .voice-demo-exit-cta-content {
        padding: var(--space-xl);
    }

    .voice-demo-exit-cta-title {
        font-size: 1.25rem;
    }

    .voice-demo-exit-cta-description {
        font-size: 0.9375rem;
    }

    .voice-demo-exit-cta-benefits li {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .voice-demo-exit-cta-content {
        padding: var(--space-lg);
    }

    .voice-demo-exit-cta-icon {
        width: 56px;
        height: 56px;
    }

    .voice-demo-exit-cta-icon svg {
        width: 28px;
        height: 28px;
    }

    .voice-demo-exit-cta-title {
        font-size: 1.125rem;
    }

    .voice-demo-exit-cta-primary {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9375rem;
    }

    .voice-demo-exit-cta-benefits {
        margin-bottom: var(--space-lg);
    }

    .voice-demo-exit-cta-benefits li {
        padding: var(--space-xs) 0;
    }
}

/* Light Theme Exit CTA */
[data-theme="light"] .voice-demo-exit-cta {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .voice-demo-exit-cta-content {
    background: var(--bg-primary);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .voice-demo-exit-cta-primary {
    color: white;
}

/* Reduced Motion Exit CTA */
@media (prefers-reduced-motion: reduce) {
    .voice-demo-exit-cta,
    .voice-demo-exit-cta-content,
    .voice-demo-exit-cta-primary,
    .voice-demo-exit-cta-primary svg {
        transition: none;
    }

    .voice-demo-exit-cta-content {
        transform: none;
    }

    .voice-demo-exit-cta.active .voice-demo-exit-cta-content {
        transform: none;
    }
}

/* ==========================================================================
   Rate Limit / Session Timeout Modal
   ========================================================================== */

.voice-demo-rate-limit-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 200;
}

.voice-demo-rate-limit-modal.active {
    opacity: 1;
    visibility: visible;
}

.voice-demo-rate-limit-content {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(
        165deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 100%
    );
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(212, 165, 48, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.voice-demo-rate-limit-modal.active .voice-demo-rate-limit-content {
    transform: translateY(0) scale(1);
}

/* Header with icon */
.voice-demo-rate-limit-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.voice-demo-rate-limit-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(212, 165, 48, 0.15) 0%,
        rgba(212, 165, 48, 0.05) 100%
    );
    border: 1px solid rgba(212, 165, 48, 0.3);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
}

.voice-demo-rate-limit-icon svg {
    width: 32px;
    height: 32px;
}

.voice-demo-rate-limit-title {
    margin: 0;
    font-family: var(--font-heading, 'Fraunces', serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Description */
.voice-demo-rate-limit-description {
    margin: 0 0 var(--space-md);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Dynamic message */
.voice-demo-rate-limit-message {
    margin: 0 0 var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

/* Highlight box */
.voice-demo-rate-limit-highlight {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-xl);
    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.1) 0%,
        rgba(34, 197, 94, 0.05) 100%
    );
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    text-align: left;
}

.voice-demo-rate-limit-highlight svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #22c55e;
    margin-top: 1px;
}

.voice-demo-rate-limit-highlight span {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Actions */
.voice-demo-rate-limit-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.voice-demo-rate-limit-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary, #c9962d) 100%
    );
    border: none;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 15px rgba(212, 165, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.voice-demo-rate-limit-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(212, 165, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.voice-demo-rate-limit-primary:active {
    transform: translateY(0);
}

.voice-demo-rate-limit-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.voice-demo-rate-limit-primary:hover svg {
    transform: translateX(3px);
}

.voice-demo-rate-limit-secondary {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.voice-demo-rate-limit-secondary:hover {
    color: var(--text-secondary);
}

/* Footer */
.voice-demo-rate-limit-footer {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* Responsive Rate Limit Modal */
@media (max-width: 768px) {
    .voice-demo-rate-limit-modal {
        padding: var(--space-md);
    }

    .voice-demo-rate-limit-content {
        padding: var(--space-xl);
    }

    .voice-demo-rate-limit-title {
        font-size: 1.25rem;
    }

    .voice-demo-rate-limit-description,
    .voice-demo-rate-limit-message {
        font-size: 0.9375rem;
    }

    .voice-demo-rate-limit-highlight span {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .voice-demo-rate-limit-content {
        padding: var(--space-lg);
    }

    .voice-demo-rate-limit-icon {
        width: 56px;
        height: 56px;
    }

    .voice-demo-rate-limit-icon svg {
        width: 28px;
        height: 28px;
    }

    .voice-demo-rate-limit-title {
        font-size: 1.125rem;
    }

    .voice-demo-rate-limit-primary {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9375rem;
    }

    .voice-demo-rate-limit-highlight {
        padding: var(--space-sm);
    }
}

/* Light Theme Rate Limit */
[data-theme="light"] .voice-demo-rate-limit-modal {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .voice-demo-rate-limit-content {
    background: var(--bg-primary);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .voice-demo-rate-limit-primary {
    color: white;
}

[data-theme="light"] .voice-demo-rate-limit-message {
    background: rgba(0, 0, 0, 0.03);
}

/* Reduced Motion Rate Limit */
@media (prefers-reduced-motion: reduce) {
    .voice-demo-rate-limit-modal,
    .voice-demo-rate-limit-content,
    .voice-demo-rate-limit-primary,
    .voice-demo-rate-limit-primary svg {
        transition: none;
    }

    .voice-demo-rate-limit-content {
        transform: none;
    }

    .voice-demo-rate-limit-modal.active .voice-demo-rate-limit-content {
        transform: none;
    }
}

/* ==========================================================================
   Session Timeout Warning Toast
   ========================================================================== */

.voice-demo-timeout-toast {
    position: absolute;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.voice-demo-timeout-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.voice-demo-timeout-toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(
        135deg,
        rgba(251, 191, 36, 0.15) 0%,
        rgba(251, 191, 36, 0.08) 100%
    );
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-full);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(251, 191, 36, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.voice-demo-timeout-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    color: #fbbf24;
    flex-shrink: 0;
}

.voice-demo-timeout-toast-icon svg {
    width: 18px;
    height: 18px;
}

.voice-demo-timeout-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voice-demo-timeout-toast-title {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.voice-demo-timeout-toast-countdown {
    font-family: var(--font-mono, 'SF Mono', 'Consolas', monospace);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.voice-demo-timeout-seconds {
    display: inline-block;
    min-width: 1.5em;
    font-weight: 700;
    color: #fbbf24;
}

/* Urgent state - when under 30 seconds */
.voice-demo-timeout-toast.urgent .voice-demo-timeout-toast-content {
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(239, 68, 68, 0.08) 100%
    );
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(239, 68, 68, 0.1);
    animation: toast-pulse 1s ease-in-out infinite;
}

.voice-demo-timeout-toast.urgent .voice-demo-timeout-toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.voice-demo-timeout-toast.urgent .voice-demo-timeout-seconds {
    color: #ef4444;
}

@keyframes toast-pulse {
    0%, 100% {
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(239, 68, 68, 0.1);
    }
    50% {
        box-shadow:
            0 4px 25px rgba(239, 68, 68, 0.2),
            0 0 0 2px rgba(239, 68, 68, 0.2);
    }
}

/* Responsive Toast */
@media (max-width: 768px) {
    .voice-demo-timeout-toast {
        top: var(--space-md);
        left: var(--space-md);
        right: var(--space-md);
        transform: translateX(0) translateY(-20px);
    }

    .voice-demo-timeout-toast.active {
        transform: translateX(0) translateY(0);
    }

    .voice-demo-timeout-toast-content {
        width: 100%;
        justify-content: center;
        padding: var(--space-sm) var(--space-md);
    }
}

@media (max-width: 480px) {
    .voice-demo-timeout-toast-icon {
        width: 28px;
        height: 28px;
    }

    .voice-demo-timeout-toast-icon svg {
        width: 16px;
        height: 16px;
    }

    .voice-demo-timeout-toast-title {
        font-size: 0.8125rem;
    }

    .voice-demo-timeout-toast-countdown {
        font-size: 0.6875rem;
    }
}

/* Light Theme Toast */
[data-theme="light"] .voice-demo-timeout-toast-content {
    background: linear-gradient(
        135deg,
        rgba(251, 191, 36, 0.12) 0%,
        rgba(251, 191, 36, 0.06) 100%
    );
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(251, 191, 36, 0.2);
}

[data-theme="light"] .voice-demo-timeout-toast.urgent .voice-demo-timeout-toast-content {
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.12) 0%,
        rgba(239, 68, 68, 0.06) 100%
    );
    border-color: rgba(239, 68, 68, 0.5);
}

/* Reduced Motion Toast */
@media (prefers-reduced-motion: reduce) {
    .voice-demo-timeout-toast,
    .voice-demo-timeout-toast-content {
        transition: none;
        animation: none;
    }

    .voice-demo-timeout-toast {
        transform: translateX(-50%) translateY(0);
    }

    .voice-demo-timeout-toast.active {
        transform: translateX(-50%) translateY(0);
    }
}
