.chatbot-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

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

.chatbot-bubble:active {
    transform: scale(0.97);
}

.chatbot-bubble-label {
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 24px 0 0 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
}

.chatbot-bubble-icon {
    width: 56px;
    height: 56px;
    background: var(--accent, #1a73e8);
    border-radius: 0 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.chatbot-bubble-icon svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.chatbot-window {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--accent, #1a73e8);
    color: #fff;
    flex-shrink: 0;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-avatar svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.chatbot-header-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.chatbot-header-subtitle {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 1px;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
}

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

.chatbot-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-msg.user {
    white-space: pre-wrap;
}

.chatbot-msg.bot ol,
.chatbot-msg.bot ul {
    margin: 4px 0;
    padding-left: 20px;
}

.chatbot-msg.bot li {
    margin-bottom: 2px;
}

.chatbot-msg.bot {
    background: #fff;
    color: #1a1d21;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chatbot-msg.user {
    background: var(--accent, #1a73e8);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.bot a {
    color: var(--accent, #1a73e8);
    text-decoration: underline;
}

.chatbot-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 14px;
    background: #fff;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chatbot-typing.visible {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9aa0a6;
    animation: chatbot-bounce 1.2s ease-in-out infinite;
}

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

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

@keyframes chatbot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.chatbot-whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f3f5;
    border-top: 1px solid #e2e5e9;
    font-size: 12px;
    color: #5f6368;
    flex-shrink: 0;
}

.chatbot-whatsapp-link a {
    color: #25d366;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chatbot-whatsapp-link a:hover {
    text-decoration: underline;
}

.chatbot-whatsapp-link svg {
    width: 14px;
    height: 14px;
    fill: #25d366;
}

.chatbot-input-area {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #e2e5e9;
    gap: 8px;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #d0d5dd;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 14px;
    outline: none;
    background: #f8f9fa;
    color: #1a1d21;
    transition: border-color 0.15s;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: var(--accent, #1a73e8);
    background: #fff;
}

.chatbot-input::placeholder {
    color: #9aa0a6;
}

.chatbot-send {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--accent, #1a73e8);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
}

.chatbot-send:hover {
    background: var(--accent-hover, #1557b0);
}

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

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

.chatbot-send svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        bottom: 8px;
        right: 8px;
        border-radius: 12px;
    }
    .chatbot-bubble-label {
        font-size: 12px;
        padding: 8px 12px;
    }
    .chatbot-bubble-icon {
        width: 48px;
        height: 48px;
    }
    .chatbot-bubble-icon svg {
        width: 22px;
        height: 22px;
    }
    .chatbot-bubble {
        bottom: 16px;
        right: 16px;
    }
}
