/* Voice Bot Styles */

.voice-bot-container {
    max-width: 900px;
    margin: 0 auto;
}

.voice-bot-header {
    margin-bottom: 2rem;
}

.voice-bot-card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.voice-bot-card .card-body {
    padding: 2rem;
}

/* Voice Controls */
.voice-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-voice {
    min-width: 160px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-voice i {
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

.btn-voice:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-voice:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Microphone Animation */
.mic-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 120px;
    margin: 2rem 0;
}

.mic-animation i {
    font-size: 3rem;
    color: #28a745;
    z-index: 2;
}

.mic-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid #28a745;
    border-radius: 50%;
    animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Transcript Container */
.transcript-container {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.transcript-message {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transcript-user {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.transcript-ai {
    background-color: #f1f8e9;
    border-left: 4px solid #8bc34a;
}

.transcript-message strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* User Info Section */
.user-info-section {
    margin-bottom: 1rem;
}

.user-info-section .alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Authentication Modal */
.voice-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

.voice-auth-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.voice-auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.voice-auth-header h3 {
    margin: 0;
    color: #333;
}

.voice-auth-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.voice-auth-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.voice-auth-form h4 {
    margin-bottom: 1.5rem;
    color: #495057;
}

.voice-auth-form .form-group {
    margin-bottom: 1.25rem;
}

.voice-auth-form label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.voice-auth-form .form-control {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.voice-auth-form .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.voice-auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #6c757d;
}

.voice-auth-switch a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.voice-auth-switch a:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

/* RTL Support for Arabic */
[dir="rtl"] .voice-controls {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-voice i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .transcript-user {
    border-left: none;
    border-right: 4px solid #2196f3;
}

[dir="rtl"] .transcript-ai {
    border-left: none;
    border-right: 4px solid #8bc34a;
}

[dir="rtl"] .voice-auth-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .user-info-section .alert {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-bot-card .card-body {
        padding: 1rem;
    }

    .voice-controls {
        flex-direction: column;
    }

    .btn-voice {
        width: 100%;
    }

    .voice-auth-modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .mic-animation {
        height: 80px;
    }

    .mic-animation i {
        font-size: 2rem;
    }

    .mic-pulse {
        width: 60px;
        height: 60px;
    }
}

/* Status Indicators */
.alert i {
    margin-right: 0.5rem;
}

[dir="rtl"] .alert i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Bootstrap Icons (if not already included) */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css');
