/* public/assets/css/ai-receptionist.css */

/* Floating Launcher */
.ai-receptionist-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-launcher-btn {
    width: 56px;
    height: 56px;
    border-radius: 0;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.ai-launcher-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.55);
}

.ai-launcher-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: inherit;
    opacity: 0.6;
    animation: ai-pulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    z-index: -1;
}

@keyframes ai-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.ai-launcher-tooltip {
    background: #0f172a;
    color: #f8fafc;
    padding: 8px 14px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    animation: ai-bounce-soft 3s infinite ease-in-out;
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
}

.ai-launcher-tooltip-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 0 2px;
}
.ai-launcher-tooltip-close:hover {
    color: #ffffff;
}

@keyframes ai-bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Chat Modal / Window */
.ai-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 120px);
    background: #0b0f19;
    color: #f1f5f9;
    border-radius: 0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

.ai-chat-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header */
.ai-chat-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(14, 165, 233, 0.85) 100%);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: #ffffff;
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ai-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 0;
    background: #10b981;
    border: 1px solid #0f172a;
}

.ai-header-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.ai-header-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-header-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.ai-header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-header-btn.muted {
    opacity: 0.6;
}

/* Chat Messages */
.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0f172a;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: ai-fade-in 0.2s ease;
}

@keyframes ai-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-msg.bot {
    align-self: flex-start;
}

.ai-msg.user {
    align-self: flex-end;
}

.ai-bubble {
    padding: 12px 16px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.ai-msg.bot .ai-bubble {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-msg.user .ai-bubble {
    background: #14b8a6;
    color: #0b0f19;
    font-weight: 500;
}

.ai-msg-time {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
    padding: 0 4px;
}
.ai-msg.user .ai-msg-time {
    align-self: flex-end;
}

/* Suggestion Chips */
.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.ai-chip {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: #5eead4;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chip:hover {
    background: rgba(20, 184, 166, 0.25);
    color: #ffffff;
    border-color: #14b8a6;
}

/* Booking Card in Chat */
.ai-booking-card {
    background: #0f2922;
    border: 1px solid #10b981;
    border-radius: 0;
    padding: 14px;
    margin-top: 8px;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.ai-booking-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: #6ee7b7;
}

.ai-booking-card-body {
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}

.ai-booking-card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ai-booking-card-label {
    color: #94a3b8;
}

/* Typing Indicator */
.ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #1e293b;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: ai-dots 1.4s infinite ease-in-out;
}
.ai-dot:nth-child(1) { animation-delay: 0s; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-dots {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Chat Footer */
.ai-chat-footer {
    padding: 12px;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
    border-color: #14b8a6;
}

.ai-chat-input::placeholder {
    color: #64748b;
}

.ai-send-btn, .ai-mic-btn {
    width: 38px;
    height: 38px;
    border-radius: 0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform 0.15s ease, background 0.2s ease;
}

.ai-send-btn {
    background: #14b8a6;
    color: #0b0f19;
}

.ai-send-btn:hover {
    background: #0d9488;
    color: #ffffff;
    transform: scale(1.05);
}

.ai-send-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.ai-mic-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.ai-mic-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.ai-mic-btn.listening {
    background: #ef4444;
    color: #ffffff;
    animation: ai-mic-pulse 1s infinite alternate;
}

@keyframes ai-mic-pulse {
    from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    to { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Mobile full width sheet */
@media (max-width: 480px) {
    .ai-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 85vh;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }

    .ai-receptionist-launcher {
        bottom: 16px;
        right: 16px;
    }
}
