:root {
    --chat-primary: #d4a211; /* Vastira Gold */
    --chat-secondary: #1a1d21; /* Vastira Dark */
    --chat-bg: rgba(255, 255, 255, 0.95);
    --chat-text: #1e293b;
    --chat-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Floating Bubble */
.chat-bubble {
    position: fixed;
    bottom: 105px; /* Above WhatsApp button (30px + 60px height + 15px gap) */
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--chat-primary), #b0860d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(212, 162, 17, 0.4);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: chat-bounce 3s infinite;
}

@keyframes chat-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(212, 162, 17, 0.6);
}

.chat-bubble svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 180px; /* Higher since bubble moved up */
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.chat-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.chat-header {
    background: var(--chat-secondary);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.bot-avatar {
    width: 40px;
    height: 40px;
    background: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.chat-status {
    font-size: 12px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.close-chat {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-chat:hover {
    color: white;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(248, 250, 252, 0.5);
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: var(--chat-text);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.message.user {
    align-self: flex-end;
    background: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 15px rgba(212, 162, 17, 0.2);
}

.typing-indicator {
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    align-self: flex-start;
    display: none;
}

.dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

/* Input Area */
.chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-area input:focus {
    border-color: var(--chat-primary);
}

.send-btn {
    background: var(--chat-primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.send-btn:hover {
    background: #b0860d;
    transform: rotate(-10deg) scale(1.1);
}

/* Quick Options */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.option-btn {
    background: rgba(212, 162, 17, 0.1);
    color: var(--chat-primary);
    border: 1px solid rgba(212, 162, 17, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover {
    background: var(--chat-primary);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    .chat-bubble {
        bottom: 140px; /* Staggered above WhatsApp (75px + 50px height + 15px gap) */
        right: 15px;
        width: 50px;
        height: 50px;
    }
    .chat-bubble svg {
        width: 24px;
        height: 24px;
    }
}
