.flo-chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Zalando Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.flo-chatbot-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #7d9482;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #fff;
}

.flo-chatbot-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.flo-chatbot-fab-icon {
    width: 28px;
    height: 28px;
}

.flo-chatbot-icon-close {
    display: none;
}

.flo-chatbot-widget.open .flo-chatbot-icon-chat {
    display: none;
}

.flo-chatbot-widget.open .flo-chatbot-icon-close {
    display: block;
}

.flo-chatbot-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.flo-chatbot-widget.open .flo-chatbot-panel {
    display: flex;
}

.flo-chatbot-header {
    background: #7d9482;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flo-chatbot-header-info {
    display: flex;
    flex-direction: column;
}

.flo-chatbot-header-name {
    font-weight: 600;
    font-size: 16px;
}

.flo-chatbot-header-status {
    font-size: 12px;
    opacity: 0.85;
}

.flo-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.flo-chatbot-close:hover {
    opacity: 1;
}

.flo-chatbot-clear {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.4;
    opacity: 0.85;
    transition: opacity 0.2s, background 0.2s;
}

.flo-chatbot-clear:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.22);
}

.flo-chatbot-clear:focus-visible {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.flo-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.flo-chatbot-message.bot {
    background: #f1e8e6;
    color: #0e0005;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.flo-chatbot-message.user {
    background: #7d9482;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.flo-chatbot-message.typing {
    display: flex;
    gap: 4px;
    padding: 14px 16px;
}

.flo-chatbot-message.typing .dot {
    width: 6px;
    height: 6px;
    background: #908482;
    border-radius: 50%;
    animation: flo-chatbot-typing 1.4s infinite;
}

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

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

@keyframes flo-chatbot-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.flo-chatbot-actions {
    padding: 0 20px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flo-chatbot-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid #7d9482;
    background: #fff;
    color: #7d9482;
    transition: background 0.2s, color 0.2s;
}

.flo-chatbot-action-btn:hover {
    background: #7d9482;
    color: #fff;
}

.flo-chatbot-action-btn svg {
    width: 14px;
    height: 14px;
}

.flo-chatbot-input-form {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #f1e8e6;
    gap: 8px;
}

.flo-chatbot-input {
    flex: 1;
    border: none;
    outline: none;
    /* 16px minimum: iOS Safari auto-zooms on focus for smaller inputs */
    font-size: 16px;
    padding: 8px 0;
    font-family: inherit;
    color: #0e0005;
}

.flo-chatbot-input::placeholder {
    color: #908482;
}

.flo-chatbot-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #7d9482;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.flo-chatbot-send:hover {
    background: #6b7f70;
}

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

.flo-chatbot-backdrop {
    display: none;
}

@media (max-width: 480px) {
    .flo-chatbot-widget {
        bottom: 16px;
        right: 16px;
    }

    /* Full-screen sheet: owns the screen so the keyboard can't bury it */
    .flo-chatbot-widget.open {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .flo-chatbot-widget.open .flo-chatbot-fab {
        display: none;
    }

    .flo-chatbot-widget.open .flo-chatbot-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(8, 10, 8, 0.55);
    }

    .flo-chatbot-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }

    /* Header stays pinned; close is the only way out (44px target) */
    .flo-chatbot-header {
        flex-shrink: 0;
    }

    .flo-chatbot-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .flo-chatbot-clear {
        padding: 10px 14px;
        min-height: 44px;
    }

    .flo-chatbot-send {
        width: 44px;
        height: 44px;
    }

    .flo-chatbot-input-form {
        flex-shrink: 0;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}
