/* Voice session — orb UI mounted into #input-area when chat_mode === 'voice' */

#input-area.voice-mode {
    padding: 0;
    background: transparent;
}

.voice-session-orb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 16px 32px 16px;
}

.voice-orb-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.voice-orb {
    position: relative;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.voice-orb-core {
    position: relative;
    z-index: 3;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #a5b4fc 0%, #6366f1 45%, #4338ca 100%);
    box-shadow:
        0 12px 32px rgba(99, 102, 241, 0.45),
        inset 0 -8px 24px rgba(67, 56, 202, 0.6),
        inset 0 8px 24px rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}

.voice-orb:hover .voice-orb-core {
    transform: scale(1.04);
}

.voice-orb:active .voice-orb-core {
    transform: scale(0.98);
}

.voice-orb-icon {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.voice-orb-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: 1;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}

.voice-orb-pulse-2 {
    z-index: 2;
}

/* Status-driven palettes & animations */
.voice-orb[data-status="idle"] .voice-orb-pulse,
.voice-orb[data-status="ready"] .voice-orb-pulse {
    opacity: 0;
    animation: none;
}

.voice-orb[data-status="connecting"] .voice-orb-core,
.voice-orb[data-status="thinking"] .voice-orb-core {
    background: radial-gradient(circle at 30% 30%, #fdba74 0%, #f97316 45%, #c2410c 100%);
    box-shadow:
        0 12px 32px rgba(249, 115, 22, 0.45),
        inset 0 -8px 24px rgba(194, 65, 12, 0.6),
        inset 0 8px 24px rgba(255, 255, 255, 0.25);
}

.voice-orb[data-status="recording"] .voice-orb-core {
    background: radial-gradient(circle at 30% 30%, #6ee7b7 0%, #10b981 45%, #047857 100%);
    box-shadow:
        0 12px 32px rgba(16, 185, 129, 0.45),
        inset 0 -8px 24px rgba(4, 120, 87, 0.6),
        inset 0 8px 24px rgba(255, 255, 255, 0.25);
}

.voice-orb[data-status="recording"] .voice-orb-pulse,
.voice-orb[data-status="speaking"] .voice-orb-pulse {
    animation: voice-orb-ripple 1.6s ease-out infinite;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, rgba(16, 185, 129, 0) 70%);
}

.voice-orb[data-status="speaking"] .voice-orb-core {
    background: radial-gradient(circle at 30% 30%, #c4b5fd 0%, #8b5cf6 45%, #5b21b6 100%);
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.5),
        inset 0 -8px 24px rgba(91, 33, 182, 0.6),
        inset 0 8px 24px rgba(255, 255, 255, 0.25);
    animation: voice-orb-breathe 1.1s ease-in-out infinite;
}

.voice-orb[data-status="speaking"] .voice-orb-pulse {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.5) 0%, rgba(139, 92, 246, 0) 70%);
}

.voice-orb[data-status="error"] .voice-orb-core {
    background: radial-gradient(circle at 30% 30%, #fca5a5 0%, #ef4444 45%, #991b1b 100%);
    box-shadow:
        0 12px 32px rgba(239, 68, 68, 0.45),
        inset 0 -8px 24px rgba(153, 27, 27, 0.6);
}

.voice-orb-pulse-2 {
    animation-delay: 0.6s !important;
}

@keyframes voice-orb-ripple {
    0% {
        opacity: 0.7;
        transform: scale(0.6);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes voice-orb-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.voice-orb-status {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.voice-orb-status[data-status="recording"] { color: #10b981; }
.voice-orb-status[data-status="speaking"]  { color: #8b5cf6; }
.voice-orb-status[data-status="connecting"],
.voice-orb-status[data-status="thinking"]  { color: #f97316; }
.voice-orb-status[data-status="error"]     { color: var(--error-color, #ef4444); }

.voice-orb-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.voice-orb-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.voice-session-transcript {
    max-height: 160px;
    overflow-y: auto;
    width: min(100%, 720px);
    padding: 10px 14px;
    background: var(--bg-surface, transparent);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.voice-session-transcript:empty {
    display: none;
}

.voice-transcript-line {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.voice-transcript-role {
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.voice-transcript-user .voice-transcript-role { color: #10b981; }
.voice-transcript-model .voice-transcript-role { color: #8b5cf6; }

.voice-transcript-text {
    color: var(--text-primary);
    word-break: break-word;
}
