/**
 * Voice Call Styles
 * 
 * @package AI360Chat
 * @subpackage Addons\VoiceCall
 */

/* Voice Call Button */
.ai360-voice-call-button {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.ai360-voice-call-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ai360-voice-call-button:active {
    transform: translateY(0);
}

.ai360-voice-call-button svg {
    width: 20px;
    height: 20px;
}

/* Voice Call Modal */
.ai360-voice-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai360-voice-call-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.ai360-voice-call-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ai360-voice-call-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai360-voice-call-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ai360-voice-call-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai360-voice-call-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body */
.ai360-voice-call-body {
    padding: 30px 24px;
    text-align: center;
}

/* Avatar */
.ai360-voice-call-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai360-voice-call-avatar svg {
    position: relative;
    z-index: 2;
    color: #667eea;
}

.ai360-voice-call-avatar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

.ai360-voice-call-avatar-pulse.listening {
    animation: pulse-active 1s ease-in-out infinite;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.5) 0%, transparent 70%);
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.3;
    }
}

@keyframes pulse-active {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.4;
    }
}

/* Status */
.ai360-voice-call-status {
    margin-bottom: 24px;
}

.ai360-voice-call-status-text {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.ai360-voice-call-timer {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

/* Transcript */
.ai360-voice-call-transcript {
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
}

.ai360-voice-call-transcript:empty {
    display: none;
}

.ai360-voice-call-transcript-entry {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

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

.ai360-voice-call-transcript-entry[data-role="user"] {
    color: #333;
}

.ai360-voice-call-transcript-entry[data-role="assistant"] {
    color: #667eea;
}

.ai360-voice-call-transcript-entry strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* Footer */
.ai360-voice-call-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.ai360-voice-call-footer button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ai360-voice-call-mute {
    background: #6c757d;
    color: white;
}

.ai360-voice-call-mute:hover {
    background: #5a6268;
}

.ai360-voice-call-mute[data-muted="true"] {
    background: #dc3545;
}

.ai360-voice-call-mute[data-muted="true"]:hover {
    background: #c82333;
}

.ai360-voice-call-end {
    background: #dc3545;
    color: white;
}

.ai360-voice-call-end:hover {
    background: #c82333;
}

.ai360-voice-call-footer button svg {
    width: 20px;
    height: 20px;
}

/* State-specific styles */
.ai360-voice-call-container[data-state="ringing"] .ai360-voice-call-avatar-pulse {
    animation: pulse-ring 1s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.2;
    }
}

.ai360-voice-call-container[data-state="ended"] .ai360-voice-call-avatar {
    opacity: 0.5;
}

.ai360-voice-call-container[data-state="ended"] .ai360-voice-call-footer {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .ai360-voice-call-button {
        bottom: 80px;
        right: 15px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .ai360-voice-call-button span {
        display: none;
    }

    .ai360-voice-call-container {
        width: 95%;
        max-width: none;
    }

    .ai360-voice-call-header,
    .ai360-voice-call-body,
    .ai360-voice-call-footer {
        padding: 16px;
    }

    .ai360-voice-call-avatar {
        width: 100px;
        height: 100px;
    }

    .ai360-voice-call-avatar svg {
        width: 60px;
        height: 60px;
    }

    .ai360-voice-call-timer {
        font-size: 28px;
    }

    .ai360-voice-call-footer {
        flex-direction: column;
    }

    .ai360-voice-call-footer button {
        width: 100%;
    }
}

/* Scrollbar */
.ai360-voice-call-transcript::-webkit-scrollbar {
    width: 6px;
}

.ai360-voice-call-transcript::-webkit-scrollbar-track {
    background: transparent;
}

.ai360-voice-call-transcript::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.ai360-voice-call-transcript::-webkit-scrollbar-thumb:hover {
    background: #999;
}
