/* Voice Chat - Full Screen Session */

.voice-session-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

/* Client Avatar */
.voice-avatar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.voice-avatar-ring {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease;
}

.voice-avatar-ring img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
}

.voice-avatar-ring .avatar-placeholder {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.voice-client-name {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.voice-phase-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

/* State indicator animations */
.voice-avatar-ring.state-listening {
    border-color: #4caf50;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    animation: pulse-green 2s infinite;
}

.voice-avatar-ring.state-processing {
    border-color: #ff9800;
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    animation: pulse-yellow 1.5s infinite;
}

.voice-avatar-ring.state-speaking {
    border-color: #2196f3;
    box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    animation: pulse-blue 1.8s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(33, 150, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

/* Status label */
.voice-status-label {
    font-size: 1.1rem;
    min-height: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

/* Bottom control bar */
.voice-control-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.voice-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.voice-mode-toggle .form-check-input {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.voice-mode-toggle .form-check-input:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

/* Mic button */
.voice-mic-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-mic-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.voice-mic-btn.active {
    background: #f44336;
    border-color: #f44336;
    animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

/* End session button */
.voice-end-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #f44336;
    background: transparent;
    color: #f44336;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-end-btn:hover {
    background: #f44336;
    color: #fff;
}

/* Admin transcript panel */
.voice-transcript-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.voice-transcript-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.voice-transcript-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.voice-transcript-msg {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.voice-transcript-msg.user-msg {
    background: rgba(76, 175, 80, 0.15);
    border-left: 3px solid #4caf50;
}

.voice-transcript-msg.ai-msg {
    background: rgba(33, 150, 243, 0.15);
    border-left: 3px solid #2196f3;
}

.voice-transcript-msg .msg-role {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.voice-transcript-msg .msg-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    float: right;
}

.voice-transcript-msg .msg-text {
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive */
@media (max-width: 768px) {
    .voice-avatar-ring {
        width: 200px;
        height: 200px;
    }

    .voice-avatar-ring img,
    .voice-avatar-ring .avatar-placeholder {
        width: 180px;
        height: 180px;
    }

    .voice-client-name {
        font-size: 1.25rem;
    }

    .voice-transcript-panel {
        width: 100%;
        height: 40%;
        top: auto;
        bottom: 80px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .voice-control-bar {
        gap: 1rem;
        padding: 1rem;
    }

    .voice-mic-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .voice-end-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
}
