/* Assistente de IA: janela de conversa (agenda e balão flutuante do site) */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #fff; color: #12233f; font-family: "VWText", "Manrope", system-ui, sans-serif; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #001e50; color: #fff; }
.chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: #00b0f0; color: #00122e; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.chat__who { display: grid; line-height: 1.25; min-width: 0; }
.chat__who small { color: #b9c7e0; font-size: .72rem; }
.chat__close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.chat__close:hover { background: rgba(255, 255, 255, .14); }

.chat__list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f6f9fd; overscroll-behavior: contain; }
.chat__msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: chatIn .25s ease; }
.chat__msg a { color: inherit; text-decoration: underline; }
.chat__msg--assistant { align-self: flex-start; background: #fff; border: 1px solid #dde5f0; border-bottom-left-radius: 4px; }
.chat__msg--user { align-self: flex-end; background: #001e50; color: #fff; border-bottom-right-radius: 4px; }
.chat__typing { display: flex; gap: 5px; padding: 14px 16px; }
.chat__typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb0c7; animation: chatDot 1.1s infinite ease-in-out; }
.chat__typing i:nth-child(2) { animation-delay: .15s; }
.chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes chatIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; background: #f6f9fd; }
.chat__chips[hidden] { display: none; }
.chat__chip { border: 1.5px solid #001e50; background: #fff; color: #001e50; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.chat__chip:hover { background: #001e50; color: #fff; }

.chat__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #dde5f0; background: #fff; align-items: flex-end; }
.chat__form textarea { flex: 1; resize: none; border: 1.5px solid #dde5f0; border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 16px; color: #12233f; background: #fff; max-height: 120px; margin: 0; }
.chat__form textarea:focus { outline: 0; border-color: #00b0f0; box-shadow: 0 0 0 3px rgba(0, 176, 240, .2); }
.chat__send { background: #001e50; color: #fff; border: 0; border-radius: 14px; padding: 0 18px; min-height: 44px; font: inherit; font-weight: 700; cursor: pointer; }
.chat__form.is-busy .chat__send { opacity: .5; pointer-events: none; }
.chat__note { margin: 0; padding: 6px 14px 10px; font-size: .68rem; color: #64748b; background: #fff; text-align: center; }

.chat__card { align-self: stretch; background: #e3f6ec; border: 1px solid #bfe8d0; color: #0b4f2e; border-radius: 14px; padding: 12px 14px; display: grid; gap: 3px; font-size: .88rem; animation: chatIn .3s ease; }
.chat__card-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.chat__card-actions a { color: #0b4f2e; font-weight: 700; }
.chat__wa { align-self: flex-start; background: #25d366; color: #00290f; font-weight: 700; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: .85rem; }

/* balão flutuante no site */
.cw-fab { position: fixed; right: 18px; bottom: 82px; z-index: 55; display: inline-flex; align-items: center; gap: 8px; background: #00b0f0; color: #00122e; border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 30, 80, .35); transition: transform .2s; }
.cw-fab:hover { transform: translateY(-2px); }
.cw-fab__dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #25d366; border: 2px solid #fff; }
.cw-fab.is-open { display: none; }
.cw-panel { position: fixed; right: 18px; bottom: 82px; z-index: 65; width: min(390px, calc(100vw - 24px)); height: min(620px, calc(100vh - 120px)); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 15, 50, .45); border: 1px solid rgba(0, 30, 80, .15); }
.cw-panel[hidden] { display: none; }
@media (max-width: 600px) {
    .cw-fab span:last-child { display: none; }
    .cw-fab { padding: 14px; bottom: 80px; }
    .cw-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
}
