/* Floating WhatsApp Button */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

.chatbot-trigger i {
    color: white;
    font-size: 32px;
}

/* Online Pulsing Dot */
.chat-online-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #ff3b30;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.chatbot-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Chat Header */
.chat-header {
    background: #0f172a;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chat-avatar {
    width: 40px;
    height: 40px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.chat-status h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-status p {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.chat-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
}

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

/* Chat Body */
.chat-body {
    height: 350px;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

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

.msg-bot {
    background: white;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.msg-user {
    background: var(--color-action);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 6px 4px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Smart Suggestions Overlay */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chat-suggestion-chip {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.chat-suggestion-chip:hover {
    background: var(--color-action);
    color: white;
    border-color: var(--color-action);
}

/* Chat Input */
.chat-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    position: relative;
}

.chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--color-action);
    background: white;
}

.chat-send {
    background: var(--color-action);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.chat-send:hover {
    background: #eab308;
    transform: scale(1.05);
}

/* Action Buttons within Chat */
.chat-btn-whatsapp {
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.chat-btn-whatsapp:hover {
    background: #1ebc59;
}
