.wbs-site-assistant,
.wbs-site-assistant * { box-sizing: border-box; }

.wbs-site-assistant {
    position: fixed;
    z-index: 10020;
    right: 24px;
    bottom: 24px;
    font-family: inherit;
}

.wbs-assistant-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    margin-bottom: 0;
    padding: 0 19px;
    border: 0;
    border-radius: 999px;
    background: #1f5c45;
    color: #fff;
    box-shadow: 0 8px 25px rgba(16, 48, 35, .3);
    cursor: pointer;
    font: inherit;
    font-size: .91rem;
    font-weight: 700;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.wbs-assistant-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.wbs-assistant-badge[hidden] { display: none !important; }
.wbs-assistant-toggle.is-attention { animation: wbs-assistant-pulse 1.8s ease-in-out 3; }
@keyframes wbs-assistant-pulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(16,48,35,.3), 0 0 0 0 rgba(31,92,69,.45); transform: translateY(0); }
    50% { box-shadow: 0 10px 28px rgba(16,48,35,.35), 0 0 0 10px rgba(31,92,69,0); transform: translateY(-1px); }
}
.wbs-assistant-teaser {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(300px, calc(100vw - 32px));
    padding: 12px 34px 12px 13px;
    border: 1px solid rgba(28,49,39,.13);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(13, 29, 21, .22);
    cursor: pointer;
}
.wbs-assistant-teaser[hidden] { display: none !important; }
.wbs-assistant-teaser-body strong { display: block; margin-bottom: 3px; color: #1f5c45; font-size: .78rem; }
.wbs-assistant-teaser-body p { margin: 0; color: #24342b; font-size: .86rem; line-height: 1.45; }
.wbs-assistant-teaser-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7971;
    cursor: pointer;
}
.wbs-assistant-teaser-close:hover { background: #f0f3f0; color: #24342b; }

.wbs-assistant-toggle:hover { background: #164a36; transform: translateY(-2px); box-shadow: 0 11px 28px rgba(16,48,35,.36); }
.wbs-assistant-toggle i { font-size: 1.06rem; }

.wbs-assistant-launcher {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid rgba(28,49,39,.13);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(13, 29, 21, .22);
}
.wbs-assistant-launcher[hidden] { display: none !important; }
.wbs-assistant-launcher-title { margin: 0 0 10px; color: #24342b; font-size: .88rem; font-weight: 700; }
.wbs-assistant-launcher-actions { display: flex; flex-direction: column; gap: 8px; }
.wbs-assistant-launcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dfe6e0;
    border-radius: 12px;
    background: #fff;
    color: #1d2b23;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}
.wbs-assistant-launcher-btn:hover { background: #f4f8f4; border-color: #bfd0c5; transform: translateY(-1px); }
.wbs-assistant-launcher-btn i { width: 18px; text-align: center; font-size: 1rem; }
.wbs-assistant-launcher-btn.is-whatsapp i { color: #25D366; }
.wbs-assistant-launcher-btn.is-ai i { color: #1f5c45; }

.wbs-assistant-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    display: flex;
    flex-direction: column;
    width: min(410px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 180px));
    min-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(28,49,39,.13);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(13, 29, 21, .25);
}

.wbs-assistant-panel[hidden] { display: none !important; }
.wbs-assistant-header { display: flex; align-items: center; gap: 11px; padding: 16px 17px; background: #173f30; color: #fff; }
.wbs-assistant-brand-icon { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #e9bd7a; }
.wbs-assistant-heading { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.wbs-assistant-heading strong { font-size: .94rem; }
.wbs-assistant-heading span { color: rgba(255,255,255,.72); font-size: .76rem; }
.wbs-assistant-close { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; font-size: 1.08rem; }
.wbs-assistant-close:hover { background: rgba(255,255,255,.13); }

.wbs-assistant-messages { display: flex; flex: 1; flex-direction: column; gap: 12px; overflow-y: auto; padding: 17px 15px; background: #f7f8f6; overscroll-behavior: contain; }
.wbs-assistant-message { max-width: 91%; align-self: flex-start; padding: 11px 13px; border: 1px solid #e4e8e3; border-radius: 13px 13px 13px 4px; background: #fff; color: #24342b; box-shadow: 0 2px 7px rgba(22,40,30,.04); }
.wbs-assistant-message.is-user { align-self: flex-end; border-color: #1f5c45; border-radius: 13px 13px 4px 13px; background: #1f5c45; color: #fff; }
.wbs-assistant-message p { margin: 0; font-size: .9rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.wbs-assistant-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wbs-assistant-sources a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; background: #edf3ee; color: #1f5c45; font-size: .72rem; font-weight: 700; text-decoration: none; }
.wbs-assistant-sources a:hover { background: #dfeae1; }
.wbs-assistant-message.is-typing { padding: 13px 15px; color: #6b7971; }
.wbs-assistant-message.is-typing p::after { content: '…'; display: inline-block; width: 1em; animation: wbs-assistant-thinking 1s steps(4, end) infinite; }
@keyframes wbs-assistant-thinking { 0%, 20% { opacity: .2; } 50% { opacity: 1; } 80%, 100% { opacity: .35; } }
.wbs-assistant-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 13px 4px; background: #fff; }
.wbs-assistant-suggestions button { padding: 7px 10px; border: 1px solid #d9e2da; border-radius: 99px; background: #fff; color: #315342; cursor: pointer; font: inherit; font-size: .74rem; }
.wbs-assistant-suggestions button:hover { border-color: #1f5c45; background: #f2f7f2; }

.wbs-assistant-form { display: flex; gap: 8px; padding: 10px 13px; border-top: 1px solid #e7eae6; background: #fff; }
.wbs-assistant-form input { flex: 1; min-width: 0; height: 45px; padding: 0 13px; border: 1px solid #dfe4df; border-radius: 10px; outline: 0; color: #1d2b23; font: inherit; font-size: .9rem; }
.wbs-assistant-form input:focus { border-color: #1f5c45; box-shadow: 0 0 0 3px rgba(31,92,69,.1); }
.wbs-assistant-form button { display: grid; flex: 0 0 45px; width: 45px; height: 45px; place-items: center; border: 0; border-radius: 10px; background: #c98a2b; color: #fff; cursor: pointer; font-size: 1rem; }
.wbs-assistant-form button:hover { background: #ad711d; }
.wbs-assistant-form button:disabled { opacity: .6; cursor: wait; }
.wbs-assistant-disclaimer { margin: 0; padding: 0 14px 11px; background: #fff; color: #7b857e; font-size: .68rem; text-align: center; }
.wbs-assistant-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 600px) {
    .wbs-site-assistant { right: 14px; bottom: 18px; }
    .wbs-assistant-toggle { min-height: 54px; margin-bottom: 0; padding: 0 16px; }
    .wbs-assistant-launcher { right: -4px; bottom: 66px; width: min(320px, calc(100vw - 24px)); }
    .wbs-assistant-teaser { right: -4px; bottom: 66px; width: min(300px, calc(100vw - 24px)); }
    .wbs-assistant-panel { right: -4px; bottom: 66px; width: min(410px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 110px)); min-height: 360px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .wbs-assistant-toggle { transition: none; }
    .wbs-assistant-toggle.is-attention { animation: none; }
    .wbs-assistant-message.is-typing p::after { animation: none; }
}
