:root {
    --adwoa-pink: #df2c70;
    --adwoa-pink-dark: #b91f58;
    --adwoa-charcoal: #242732;
    --adwoa-ink: #171923;
    --adwoa-muted: #656b78;
    --adwoa-line: #e2e4e9;
    --adwoa-soft: #f6f7f9;
}

.adwoa-widget,
.adwoa-widget * { box-sizing: border-box; letter-spacing: 0; }
.adwoa-widget { bottom: max(18px, env(safe-area-inset-bottom)); color: var(--adwoa-ink); font-family: Montserrat, Nunito, "Segoe UI", sans-serif; position: fixed; right: max(18px, env(safe-area-inset-right)); z-index: 2147483000; }
.adwoa-launcher { align-items: center; background: var(--adwoa-pink); border: 0; border-radius: 50%; box-shadow: 0 10px 28px rgba(36, 39, 50, .22); color: #fff; cursor: pointer; display: inline-flex; height: 58px; justify-content: center; margin-left: auto; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; width: 58px; }
.adwoa-launcher:hover { background: var(--adwoa-pink-dark); box-shadow: 0 13px 32px rgba(36, 39, 50, .28); transform: translateY(-2px); }
.adwoa-launcher:focus-visible, .adwoa-panel button:focus-visible, .adwoa-panel a:focus-visible, .adwoa-panel textarea:focus-visible { outline: 3px solid rgba(223, 44, 112, .28); outline-offset: 2px; }
.adwoa-launcher svg { height: 27px; width: 27px; }
.adwoa-launcher .adwoa-icon-close { display: none; }
.adwoa-widget.is-open .adwoa-launcher .adwoa-icon-chat { display: none; }
.adwoa-widget.is-open .adwoa-launcher .adwoa-icon-close { display: block; }

.adwoa-widget .adwoa-panel { background: #fff; border: 1px solid var(--adwoa-line); border-radius: 8px; bottom: 72px; box-shadow: 0 22px 60px rgba(24, 27, 36, .2); display: flex; flex-direction: column; height: min(680px, calc(100vh - 116px)); max-width: calc(100vw - 36px); opacity: 0; overflow: hidden; pointer-events: none; position: absolute; right: 0; transform: translateY(12px) scale(.985); transform-origin: bottom right; transition: opacity .2s ease, transform .2s ease; visibility: hidden; width: 390px; }
.adwoa-widget.is-open .adwoa-panel { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); visibility: visible; }
.adwoa-header { align-items: center; background: var(--adwoa-charcoal); color: #fff; display: grid; gap: 12px; grid-template-columns: 42px minmax(0, 1fr) 38px; min-height: 78px; padding: 12px 14px; }
.adwoa-avatar { align-items: center; background: var(--adwoa-pink); border-radius: 50%; display: inline-flex; font-size: 18px; font-weight: 800; height: 42px; justify-content: center; width: 42px; }
.adwoa-header strong, .adwoa-header small { display: block; }
.adwoa-header strong { font-size: 15px; line-height: 1.25; }
.adwoa-header small { color: #c8cbd3; font-size: 11px; margin-top: 3px; }
.adwoa-close { align-items: center; background: transparent; border: 0; border-radius: 4px; color: #fff; cursor: pointer; display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.adwoa-close:hover { background: rgba(255,255,255,.09); }
.adwoa-close svg { height: 20px; width: 20px; }

.adwoa-log { flex: 1; overflow-x: hidden; overflow-y: auto; padding: 18px 14px 8px; scroll-behavior: smooth; }
.adwoa-intro { margin-bottom: 17px; }
.adwoa-intro h2 { color: var(--adwoa-ink); font-size: 17px; font-weight: 800; line-height: 1.35; margin: 0 0 6px; }
.adwoa-intro p { color: var(--adwoa-muted); font-size: 12px; line-height: 1.55; margin: 0; }
.adwoa-quick-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 20px; }
.adwoa-quick-prompt { background: #fff; border: 1px solid #d8dbe2; border-radius: 5px; color: var(--adwoa-charcoal); cursor: pointer; font-size: 11px; font-weight: 700; min-height: 34px; padding: 7px 10px; text-align: left; }
.adwoa-quick-prompt:hover { background: #fff5f8; border-color: var(--adwoa-pink); color: var(--adwoa-pink-dark); }
.adwoa-message { display: flex; margin: 0 0 13px; }
.adwoa-message--user { justify-content: flex-end; }
.adwoa-bubble { border-radius: 7px; font-size: 12px; line-height: 1.55; max-width: 86%; overflow-wrap: anywhere; padding: 10px 12px; white-space: pre-wrap; }
.adwoa-message--assistant .adwoa-bubble { background: var(--adwoa-soft); border: 1px solid #e8e9ed; border-bottom-left-radius: 2px; color: var(--adwoa-ink); }
.adwoa-message--user .adwoa-bubble { background: var(--adwoa-charcoal); border-bottom-right-radius: 2px; color: #fff; }
.adwoa-message--error .adwoa-bubble { background: #fff2f3; border-color: #efc7cb; color: #8a2730; }
.adwoa-message-meta { color: var(--adwoa-muted); display: block; font-size: 9px; margin-top: 5px; }
.adwoa-citations { border-top: 1px solid #dcdee4; margin-top: 10px; padding-top: 8px; }
.adwoa-citations strong { display: block; font-size: 9px; margin-bottom: 4px; text-transform: uppercase; }
.adwoa-citations a, .adwoa-citations span { color: var(--adwoa-pink-dark); display: block; font-size: 10px; margin-top: 4px; overflow-wrap: anywhere; }
.adwoa-citations a { text-decoration: underline; }
.adwoa-whatsapp { align-items: center; color: #177d4c; display: inline-flex; font-size: 11px; font-weight: 800; gap: 6px; margin-top: 9px; }
.adwoa-feedback { align-items: center; display: flex; gap: 4px; margin-top: 7px; }
.adwoa-feedback span { color: var(--adwoa-muted); font-size: 9px; margin-right: 3px; }
.adwoa-feedback button { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--adwoa-muted); cursor: pointer; display: inline-flex; height: 28px; justify-content: center; width: 28px; }
.adwoa-feedback button:hover, .adwoa-feedback button.is-selected { background: #fff1f6; border-color: #f1c1d4; color: var(--adwoa-pink-dark); }
.adwoa-feedback svg { height: 14px; width: 14px; }
.adwoa-typing { align-items: center; display: flex; gap: 4px; min-height: 16px; }
.adwoa-typing i { animation: adwoa-pulse 1.1s infinite ease-in-out; background: #8c919c; border-radius: 50%; height: 5px; width: 5px; }
.adwoa-typing i:nth-child(2) { animation-delay: .14s; }
.adwoa-typing i:nth-child(3) { animation-delay: .28s; }

.adwoa-status { color: var(--adwoa-muted); font-size: 10px; min-height: 16px; padding: 0 14px 5px; }
.adwoa-status[hidden] { display: none; }
.adwoa-composer { background: #fff; border-top: 1px solid var(--adwoa-line); padding: 10px 11px 11px; }
.adwoa-compose-row { align-items: flex-end; background: #fff; border: 1px solid #cfd3db; border-radius: 6px; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) 40px; padding: 5px; }
.adwoa-compose-row:focus-within { border-color: var(--adwoa-pink); box-shadow: 0 0 0 3px rgba(223,44,112,.09); }
.adwoa-composer textarea { background: transparent; border: 0; color: var(--adwoa-ink); font: inherit; font-size: 12px; line-height: 1.45; max-height: 92px; min-height: 38px; outline: 0; padding: 9px 7px 6px; resize: none; width: 100%; }
.adwoa-send { align-items: center; background: var(--adwoa-pink); border: 0; border-radius: 5px; color: #fff; cursor: pointer; display: inline-flex; height: 40px; justify-content: center; width: 40px; }
.adwoa-send:hover { background: var(--adwoa-pink-dark); }
.adwoa-send:disabled, .adwoa-composer textarea:disabled { cursor: not-allowed; opacity: .55; }
.adwoa-send svg { height: 18px; width: 18px; }
.adwoa-footer-row { align-items: center; display: flex; justify-content: space-between; min-height: 27px; padding-top: 7px; }
.adwoa-footer-row small { color: #858a95; font-size: 9px; }
.adwoa-escalate { background: transparent; border: 0; color: var(--adwoa-muted); cursor: pointer; font-size: 10px; font-weight: 700; padding: 4px; }
.adwoa-escalate:hover { color: var(--adwoa-pink-dark); text-decoration: underline; }
.adwoa-sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@keyframes adwoa-pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@media (max-width: 520px) {
    .adwoa-widget { bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); }
    .adwoa-widget .adwoa-panel { border: 0; border-radius: 0; bottom: -12px; height: 100dvh; max-width: 100vw; position: fixed; right: -12px; width: 100vw; }
    .adwoa-header { padding-top: max(12px, env(safe-area-inset-top)); }
    .adwoa-widget.is-open .adwoa-launcher { opacity: 0; pointer-events: none; }
    .adwoa-composer { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .adwoa-launcher, .adwoa-panel { transition: none; }
    .adwoa-typing i { animation: none; opacity: .65; }
    .adwoa-log { scroll-behavior: auto; }
}
