.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
    pointer-events: auto;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    padding: 0;
    pointer-events: auto;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.chatbot-button:active {
    transform: scale(0.95);
}

.chatbot-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.chatbot-button.active {
    background: linear-gradient(135deg, #20ba5a 0%, #25d366 100%);
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
    pointer-events: none;
}

.chatbot-window.active {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.chatbot-header {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f5f5;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

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

.message.user {
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 12px 12px 12px 0;
}

.message.user .message-content {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px 12px 12px 0;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    background: white;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #25d366;
}

.chatbot-input::placeholder {
    color: #999;
}

.chatbot-send {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    border-left: 3px solid #c33;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 32px);
        height: 60vh;
        max-height: 500px;
        bottom: 80px;
        right: 16px;
    }

    .message-content {
        max-width: 85%;
    }

    .chatbot-button {
        width: 56px;
        height: 56px;
    }

    .chatbot-button svg {
        width: 28px;
        height: 28px;
    }
}

.whatsapp-button-container {
    margin-top: 8px;
    width: 100%;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
}

.whatsapp-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

@media (max-width: 360px) {
    .chatbot-window {
        width: calc(100vw - 16px);
        right: 8px;
    }

    .chatbot-header h3 {
        font-size: 14px;
    }

    .message-content {
        font-size: 13px;
    }

    .whatsapp-button {
        font-size: 12px;
        padding: 8px 12px;
    }
}
