/* Call Shakti - Premium Voice Call UI */

/* Variables are expected to be defined in main.css or root */

.call-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2e 50%, #0f0518 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.call-modal.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Header */
.call-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: transparent;
    position: relative;
    z-index: 10;
}

.call-header .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 215, 0, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.call-header .back-btn:hover {
    background: rgba(255, 215, 0, 0.15);
}

.call-header .header-center {
    text-align: center;
}

.call-header .shakti-symbol {
    font-size: 1rem;
    color: #ffd700;
}

.call-header h1 {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: #fff;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem;
    /* FIX: Added proper margin to avoid overlap */
    margin: 1.5rem auto 1rem auto;
    background: rgba(20, 10, 40, 0.8);
    border-radius: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.15);
    width: fit-content;
    z-index: 20;
}

.lang-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 1.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-btn.active {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

/* Call Container */
.call-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Avatar */
.avatar-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 3rem;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.avatar-container.speaking .avatar-glow {
    opacity: 1;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
}

.avatar-container.speaking .avatar-ring {
    border-color: rgba(255, 215, 0, 0.6);
    animation: pulse-ring 1.5s ease-in-out infinite;
}

.avatar-container.listening .avatar-ring {
    border-color: rgba(100, 200, 255, 0.6);
}

.avatar-inner {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon {
    font-size: 4rem;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* Sound Waves */
.sound-waves {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-container.speaking .sound-waves {
    opacity: 1;
}

.sound-waves span {
    width: 4px;
    background: linear-gradient(to top, #ffd700, #ff8c00);
    border-radius: 2px;
    animation: sound-wave 0.5s ease-in-out infinite;
}

.sound-waves span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.sound-waves span:nth-child(2) {
    height: 16px;
    animation-delay: 0.1s;
}

.sound-waves span:nth-child(3) {
    height: 12px;
    animation-delay: 0.2s;
}

@keyframes sound-wave {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.5);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Status */
.call-status {
    margin-bottom: 1rem;
    text-align: center;
}

.call-status p {
    font-size: 1.1rem;
    color: #e2e8f0;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.status-error {
    color: #ff6b6b !important;
}

.status-connected {
    color: #7bed9f !important;
}

.status-idle {
    color: #94a3b8 !important;
}

/* Subtitle */
.call-subtitle {
    font-family: serif;
    font-size: 1rem;
    font-style: italic;
    color: #ffd700;
    opacity: 0.8;
    text-align: center;
    max-width: 300px;
    margin-top: 0.5rem;
}

/* Call Controls */
.call-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.mute-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mute-btn.muted {
    background: rgba(255, 100, 100, 0.2);
    border-color: rgba(255, 100, 100, 0.4);
    color: #ff6b6b;
}

.placeholder {
    visibility: hidden;
    width: 56px;
    height: 56px;
}

.call-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-call {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.start-call:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(76, 175, 80, 0.5);
}

.end-call {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: #fff;
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

.end-call:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(244, 67, 54, 0.5);
}

/* Instructions */
.call-instructions {
    text-align: center;
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.call-instructions p {
    margin: 0.5rem 0;
}

/* FAB - Floating Action Button */
.call-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* FIXED: Moved to left */
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 30px;
    padding: 16px 28px;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    overflow: hidden;
    color: #1a0a2e;
    /* Ensure text color */
}

.call-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.4);
}

.fab-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a0a2e;
}

.fab-icon {
    font-size: 24px;
}

.fab-label {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Mobile */
@media (max-width: 600px) {
    .avatar-container {
        width: 150px;
        height: 150px;
    }

    .avatar-icon {
        font-size: 3rem;
    }

    .call-btn {
        width: 64px;
        height: 64px;
    }

    .control-btn {
        width: 48px;
        height: 48px;
    }

    .call-fab {
        bottom: 80px;
    }
}