/* ===================================
   AI VOICE SUPPORT ASSISTANT STYLES
   =================================== */

/* Floating Support Button - Professional & Compact */
.ai-voice-support-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 05px 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 9998;
}

.ai-voice-support-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.ai-btn-icon {
    font-size: 18px;
}

/* AI Assistant Container */
.ai-assistant-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

.ai-assistant-container.open {
    display: flex;
}

/* Header */
.ai-assistant-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.ai-assistant-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.ai-icon {
    font-size: 24px;
}

.voice-indicator {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

.voice-indicator.speaking {
    background: #f59e0b;
    animation: pulse-speaking 0.5s infinite;
}

.voice-indicator.listening {
    background: #ef4444;
    animation: pulse-speaking 0.3s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-speaking {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.ai-voice-mode-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ai-voice-mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.ai-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Interim Transcript */
.ai-interim-transcript {
    padding: 10px 20px;
    background: #fef3c7;
    border-top: 1px solid #fbbf24;
    font-size: 14px;
    color: #92400e;
    font-style: italic;
    display: none;
    min-height: 20px;
}

/* Messages Area */
.ai-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-bot {
    align-self: flex-start;
}

.ai-message-user {
    align-self: flex-end;
}

.ai-message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    white-space: pre-line;
}

.ai-message-bot .ai-message-content {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 12px 12px 12px 4px;
}

.ai-message-user .ai-message-content {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.ai-message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

/* Consultation Summary */
.consultation-summary {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #3b82f6;
}

.consultation-summary h3 {
    color: #1e3a8a;
    margin-bottom: 15px;
    font-size: 18px;
}

.consultation-summary p {
    margin: 10px 0;
    color: #374151;
}

.consultation-summary strong {
    color: #1f2937;
    font-weight: 600;
}

.confirmation-note {
    background: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.consultation-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.consultation-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm {
    background: #10b981;
    color: white;
}

.btn-confirm:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #ef4444;
    color: white;
}

.btn-cancel:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* FAQ Suggestion Chips — rendered inside the messages area */
.ai-faq-chips-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

.ai-faq-chips-row {
    display: flex;
    flex-direction: column;
    /* vertical stack like the reference image */
    gap: 8px;
}

.ai-faq-chip {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    text-align: left;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-faq-chip:hover {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    transform: translateX(3px);
}

/* Input Area */
.ai-assistant-input {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.ai-assistant-input-inner {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    padding: 6px 8px 6px 16px;
}

.ai-input-icon {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    color: #6b7280;
}

.ai-assistant-input input {
    flex: 1;
    padding: 12px 14px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    outline: none;
    color: #111827;
    background: transparent;
    font-weight: 500;
}

.ai-assistant-input input::placeholder {
    color: #6b7280;
    font-weight: 400;
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ai-send-btn:hover {
    background: #1e3a8a;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}


.ai-voice-btn.listening {
    animation: pulse-mic 1s infinite;
}

@keyframes pulse-mic {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8);
    }
}

/* Quick Actions */
.ai-quick-actions {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.ai-quick-actions button {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.ai-quick-actions button:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Scrollbar Styling */
.ai-assistant-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-assistant-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.ai-assistant-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.ai-assistant-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-voice-support-button {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .ai-btn-icon {
        font-size: 16px;
    }

    .ai-assistant-container {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .ai-assistant-header {
        border-radius: 0;
    }

    .ai-message {
        max-width: 85%;
    }

    .ai-quick-actions {
        gap: 6px;
    }

    .ai-quick-actions button {
        font-size: 12px;
        padding: 6px 12px;
    }
}