/* Sticky AI Agent Styles */
.sticky-ai-agent {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: Arial, sans-serif;
}

.agent-toggle-btn {
    background: linear-gradient(135deg, #a66af4, #8c42ed);
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    animation: callPulse 2s infinite;
    border: none;
    z-index: 10000;
}

@keyframes callPulse {
    0% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(142, 68, 173, 0); }
    100% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0); }
}

.agent-toggle-btn::before {
    content: "";
    background: #b589ee;
    width: 40px;
    height: 40px;
    border-radius: 50px;
    margin-left: 10px;
    border: 1px solid rgb(190, 188, 188);
}

.agent-toggle-btn i {
    margin-left: -45px;
  
    z-index: 1000;
    font-size: 20px;
}

.agent-toggle-btn .call {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 600;
}

.agent-toggle-btn:hover {
    transform: scale(1.1);
}

.agent-toggle-btn.active {
    background: linear-gradient(135deg, #FF9500, #FF5E3A);
}

/* Phone Interface - FIXED POSITIONING */
.agent-phone-interface {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 0;
    overflow: hidden;
    background: #191818;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: height 0.5s ease, opacity 0.3s ease;
    border: 10px solid #111;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
}

.agent-phone-interface.open {
    height: 600px;
    opacity: 1;
    visibility: visible;
}

.phone-notch {
    width: 40%;
    height: 20px;
    background: #111;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background: #111;
    color: white;
    font-size: 12px;
    font-weight: bold;
    height: 25px;
}

/* Agent Content */
.agent-content {
    padding: 20px;
    height: calc(100% - 25px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 15px;
}

.agent-header {
    text-align: center;
    margin-bottom: 10px;
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #913BFF;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #913BFF 0%, #6C1BFF 100%);
    color: white;
    font-size: 32px;
}

.agent-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.agent-role {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.agent-language-badge {
    display: inline-block;
    background: #913BFF;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Call Button */
.call-button {
    background: linear-gradient(135deg, #4CD964 0%, #2ECC71 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 217, 100, 0.3);
    width: 100%;
    max-width: 250px;
}

.call-button:hover {
    transform: translateY(-2px);
}

.call-button.calling {
    background: linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
}

.call-button.connected {
    background: linear-gradient(135deg, #913BFF 0%, #6C1BFF 100%);
    cursor: not-allowed;
}

/* Ringing Animation */
.ringing-animation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    display: none;
}

.ringing-dot {
    width: 12px;
    height: 12px;
    background: #913BFF;
    border-radius: 50%;
    animation: ringing 1.4s ease-in-out infinite;
}

@keyframes ringing {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

/* Countdown Timer */
.countdown-timer {
    font-size: 48px;
    font-weight: 700;
    color: #913BFF;
    text-align: center;
    margin: 10px 0;
    display: none;
}

/* Connected Display */
.connected-display {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: none;
    border-left: 4px solid #913BFF;
}

.ai-response {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
}

.message-time {
    font-size: 11px;
    color: #999;
    text-align: right;
}

/* Status Messages */
.status-message {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 5px 0;
    min-height: 20px;
    font-weight: 500;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 3px solid #2575fc;
}

/* Voice Wave Animation */
.voice-wave-container {
    display: none;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.voice-wave {
    display: flex;
    align-items: flex-end;
    height: 30px;
    gap: 3px;
    margin-bottom: 8px;
}

.voice-bar {
    width: 4px;
    background: #913BFF;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}

.voice-bar:nth-child(1) { animation-delay: 0s; }
.voice-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-bar:nth-child(5) { animation-delay: 0.4s; }
.voice-bar:nth-child(6) { animation-delay: 0.5s; }
.voice-bar:nth-child(7) { animation-delay: 0.6s; }

.listening-text {
    font-size: 12px;
    color: #913BFF;
    font-weight: 500;
}

/* Transcript Display */
.transcript-display {
    background: #f0f2ff;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    color: #333;
    margin: 5px 0;
    min-height: 40px;
    max-height: 80px;
    overflow-y: auto;
    display: none;
    border: 1px solid #e0e7ff;
}

/* End Call Button */
.end-call-btn {
    background: linear-gradient(135deg, #FF3B6B 0%, #FF2D55 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 5px auto;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 59, 107, 0.3);
    width: 100%;
    max-width: 200px;
}

.end-call-btn:hover {
    transform: translateY(-2px);
}

/* Call Timer */
.call-timer {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 5px 0;
    display: none;
    font-weight: 600;
    color: #913BFF;
}

/* Sample Questions */
.sample-questions {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.sample-questions h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.sample-questions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.sample-questions li {
    background: #f0f2ff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid #e0e7ff;
}

.sample-questions li:hover {
    background: #913BFF;
    color: white;
    transform: translateY(-2px);
}

/* Permission Notice */
.permission-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 12px;
    color: #856404;
    display: none;
}

.permission-btn {
    background: #913BFF;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.permission-btn:hover {
    background: #6C1BFF;
}

/* Audio Test */
.audio-test {
    text-align: center;
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sticky-ai-agent {
        bottom: 15px;
        right: 15px;
    }
    
    .agent-phone-interface {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 40px);
        max-width: 350px;
       
    }
    
    .agent-phone-interface.open {
        height: 550px;
    }
}

@media (max-width: 480px) {
    .sticky-ai-agent {
        bottom: 10px;
        right: 10px;
    }
    
    .agent-toggle-btn {
        padding: 12px 20px;
    }
    
    .agent-toggle-btn .call {
        font-size: 14px;
    }
    
    .agent-phone-interface {
        right: 10px;
        bottom: 70px;
        width:300px;
        height: 600px;
    }
    
    .agent-phone-interface.open {
        height: 600px;
    }
    
    .agent-content {
        padding: 15px;
    }
}

/* Mobile Full Screen Mode */
@media (max-width: 360px) {
    .agent-phone-interface {
        width: 300px;
        right: 10px;
        border-radius: 20px;
    }
    
    .agent-phone-interface.open {
        
        height: 600px;
    }
}

/* Add these styles to your CSS file */

/* Speaking indicator */
.speaking-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.speaking-indicator.active {
    display: flex;
}

.speaking-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.speaking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.speaking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Audio test button */
.audio-test-btn {
    background: linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px auto;
    display: block;
    transition: all 0.3s ease;
}

.audio-test-btn:hover {
    transform: translateY(-2px);
}
