:root {
    --primary-gradient: linear-gradient(135deg, #e5097f 0%, #fb00ff 100%);
    --primary-color: #e5097f;
    --bg-dark: #ffffff;
    --text-dark: #333;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.1);
    --bot-msg-bg: rgba(229, 9, 127, 0.08);
    --user-msg-bg: #f3f4f6;
    --text-light: #ffffff;
}

/* CHAT WIDGET STYLES */
.chat-container {
    position: fixed;
    bottom: 80px;
    /* Elevated to avoid overlapping with mobile CTA if present */
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: 'Outfit', sans-serif;
}

.chat-trigger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(229, 9, 127, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.chat-trigger-btn svg {
    width: 30px;
    height: 30px;
}

.chat-trigger-btn:hover {
    transform: scale(1.1);
}

/* Chat Window */
.chat-window {
    width: 380px;
    height: 550px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.4s ease;
    opacity: 1;
    transform: translateY(0);
}

.chat-container.minimized .chat-window {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    height: 0;
}

/* Header */
.chat-header {
    background: var(--primary-gradient);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.whatsapp-header-btn {
    color: #25d366;
    background: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.whatsapp-header-btn:hover {
    transform: scale(1.1);
}

.whatsapp-header-btn svg {
    width: 22px;
    height: 22px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    object-fit: cover;
    /* Ensures the real photo isn't stretched */
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.bot-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.bot-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9f9f9;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-message {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#user-input {
    flex: 1;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 15px;
    color: #333;
    resize: none;
    max-height: 100px;
    font-size: 0.95rem;
    outline: none;
}

#user-input:focus {
    border-color: var(--primary-color);
    background: white;
}

#send-btn {
    background: var(--primary-gradient);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.chat-footer {
    padding: 10px;
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    background: white;
}

.magenta-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #e5097f;
    border-radius: 50%;
    margin: 0 4px;
    vertical-align: middle;
    box-shadow: 0 0 5px rgba(229, 9, 127, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots::after {
    content: '...';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0% {
        content: '.';
    }

    33% {
        content: '..';
    }

    66% {
        content: '...';
    }
}