.b2-chatbot,.b2-chatbot *{box-sizing:border-box}.b2-chatbot{position:relative;width:100%;max-width:680px;height:var(--b2-chatbot-height,650px);display:flex;flex-direction:column;background:#fff;border-radius:16px;box-shadow:0 8px 32px rgba(0,0,0,.12);overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.b2-chat-header{background:#005f8e;color:#fff;padding:18px 20px;display:flex;align-items:center;gap:12px}.b2-header-avatar{width:40px;height:40px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px}.b2-chat-header h2{font-size:16px;line-height:1.2;margin:0;color:#fff}.b2-chat-header p{font-size:12px;opacity:.8;margin:4px 0 0}.b2-status-dot{width:8px;height:8px;background:#4ade80;border-radius:50%;display:inline-block;margin-right:4px}.b2-chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.b2-msg{display:flex;gap:8px;max-width:85%}.b2-user{align-self:flex-end;flex-direction:row-reverse}.b2-bot{align-self:flex-start}.b2-bubble{padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.b2-user .b2-bubble{background:#005f8e;color:#fff;border-bottom-right-radius:4px}.b2-bot .b2-bubble{background:#f0f4f8;color:#1a1a1a;border-bottom-left-radius:4px}.b2-avatar-sm{width:30px;height:30px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:14px}.b2-bot .b2-avatar-sm{background:#005f8e;color:#fff}.b2-user .b2-avatar-sm{background:#e2e8f0;color:#555}.b2-suggestions{padding:0 20px 12px;display:flex;flex-wrap:wrap;gap:8px}.b2-suggestions[hidden]{display:none}.b2-suggestions button{font-size:12px;padding:6px 12px;border:1.5px solid #005f8e;border-radius:20px;background:transparent;color:#005f8e;cursor:pointer}.b2-suggestions button:hover{background:#005f8e;color:#fff}.b2-chat-input{padding:16px;border-top:1px solid #e2e8f0;display:flex;gap:10px;background:#fff}.b2-chat-input input{flex:1;min-width:0;padding:10px 16px;border:1.5px solid #cbd5e1;border-radius:24px;font-size:14px;outline:none}.b2-chat-input input:focus{border-color:#005f8e}.b2-send-button{width:42px;height:42px;background:#005f8e;border:none;border-radius:50%;color:#fff;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.b2-send-button:hover{background:#004a70}.b2-send-button:disabled{background:#93c5e8;cursor:not-allowed}.b2-chat-footer{padding:10px 16px;border-top:1px solid #e2e8f0;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:8px}.b2-email-tag{font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%}.b2-end-chat{padding:8px 16px;background:transparent;border:1.5px solid #e53e3e;border-radius:20px;color:#e53e3e;font-size:13px;font-weight:600;cursor:pointer}.b2-end-chat:hover{background:#e53e3e;color:#fff}.b2-email-gate{position:absolute;inset:0;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 28px;gap:16px;z-index:10;border-radius:16px}.b2-email-gate[hidden]{display:none}.b2-gate-icon{font-size:48px}.b2-email-gate h3{font-size:18px;font-weight:700;color:#1a1a1a;text-align:center;margin:0}.b2-email-gate p{font-size:13px;color:#64748b;text-align:center;line-height:1.5;margin:0}.b2-email-gate input{width:100%;padding:12px 16px;border:1.5px solid #cbd5e1;border-radius:10px;font-size:14px;outline:none}.b2-email-gate input:focus{border-color:#005f8e}.b2-email-gate input.has-error{border-color:#e53e3e}.b2-email-error{font-size:12px;color:#e53e3e;align-self:flex-start;margin-top:-10px}.b2-start-chat{width:100%;padding:12px;background:#005f8e;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer}.b2-start-chat:hover{background:#004a70}.b2-typing .b2-bubble{display:flex;gap:4px;padding:15px}.b2-typing .b2-bubble span{width:7px;height:7px;background:#999;border-radius:50%;animation:b2bounce 1.2s infinite}.b2-typing .b2-bubble span:nth-child(2){animation-delay:.2s}.b2-typing .b2-bubble span:nth-child(3){animation-delay:.4s}@keyframes b2bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}@media(max-width:600px){.b2-chatbot{height:600px;max-height:85vh}.b2-chat-messages{padding:14px}.b2-suggestions{padding-left:14px;padding-right:14px}.b2-email-tag{max-width:58%}}

/* =========================================================
   Floating chatbot layout
   ========================================================= */

.b2-chatbot-floating-wrap,
.b2-chatbot-floating-wrap * {
    box-sizing: border-box;
}

.b2-chatbot-floating-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
}

/* Floating launcher button */
.b2-chatbot-toggle {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #005f8e;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.b2-chatbot-toggle:hover {
    background: #004a70;
    transform: translateY(-2px);
}

.b2-chatbot-toggle:focus-visible,
.b2-chatbot-close:focus-visible {
    outline: 3px solid rgba(0, 95, 142, 0.28);
    outline-offset: 3px;
}

/* Popup panel */
.b2-chatbot-floating-wrap .b2-chatbot {
    position: absolute;
    right: 0;
    bottom: 80px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: var(--b2-chatbot-height, 620px);
    max-height: calc(100vh - 120px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.b2-chatbot-floating-wrap.is-open .b2-chatbot {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header layout for close button */
.b2-chat-header-info {
    flex: 1;
    min-width: 0;
}

.b2-chatbot-close {
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

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

/* Prevent page builders from reserving unnecessary space */
.b2-chatbot-floating-wrap {
    width: 0;
    height: 0;
}

/* Mobile */
@media (max-width: 600px) {
    .b2-chatbot-floating-wrap {
        right: 12px;
        bottom: 12px;
    }

    .b2-chatbot-toggle {
        width: 58px;
        height: 58px;
        font-size: 25px;
    }

    .b2-chatbot-floating-wrap .b2-chatbot {
        position: fixed;
        right: 10px;
        left: 10px;
        bottom: 82px;
        width: auto;
        max-width: none;
        height: calc(100vh - 105px);
        max-height: none;
        border-radius: 14px;
    }

    .b2-chatbot-floating-wrap .b2-chat-messages {
        padding: 14px;
    }

    .b2-chatbot-floating-wrap .b2-suggestions {
        padding-left: 14px;
        padding-right: 14px;
    }
}
