/* ============================================================
   CHATBOT IRACEMA - Portal da Historia do Ceara
   Theme-aware usando CSS custom properties de theme.css
   ============================================================ */

/* ============================================================
   ANIMACOES
   ============================================================ */
@keyframes chatbot-bounce-in {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.15); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes chatbot-pulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(211, 158, 0, 0.22); }
    50%      { box-shadow: 0 3px 14px rgba(211, 158, 0, 0.32); }
}

@keyframes chatbot-slide-up {
    0%   { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes chatbot-slide-down {
    0%   { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

@keyframes chatbot-toast-in {
    0%   { transform: translateX(20px) scale(0.9); opacity: 0; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes chatbot-toast-out {
    0%   { transform: translateX(0) scale(1); opacity: 1; }
    100% { transform: translateX(20px) scale(0.9); opacity: 0; }
}

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

@keyframes chatbot-badge-pop {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Shake horizontal em erro/retry — chama atencao sem ser agressivo. */
@keyframes chatbot-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-4px); }
    40%      { transform: translateX(4px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}

/* Pulse curto disparado por classe ao enviar — confirma "ouvi voce". */
@keyframes chatbot-send-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(0.88); }
    100% { transform: scale(1); }
}

/* Notification dot atraindo atencao quando toast esta ativo. */
@keyframes chatbot-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
}

/* ============================================================
   BOTAO FLUTUANTE (FAB)
   ============================================================ */
.chatbot-fab {
    position: fixed;
    bottom: 72px;
    right: 12px;
    z-index: 9999;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(211, 158, 0, 0.35);
    animation: chatbot-bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55),
               chatbot-pulse 3s ease-in-out 2s infinite;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.chatbot-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(211, 158, 0, 0.5);
}

.chatbot-fab:active {
    transform: scale(0.95);
}

.chatbot-fab.chatbot-fab--open {
    animation: none;
    background: linear-gradient(135deg, #6a4f00 0%, #8b6914 100%);
}

.chatbot-fab .chatbot-fab-icon {
    transition: transform 0.3s ease;
}

.chatbot-fab.chatbot-fab--open .chatbot-fab-icon {
    transform: rotate(90deg);
}

/* Notification dot */
.chatbot-fab-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e74c3c;
    border: 2px solid #fff;
    display: none;
}

.chatbot-fab-dot.active {
    display: block;
    animation: chatbot-dot-pulse 1.6s ease-out infinite;
}

/* ============================================================
   TOAST / CONVITE
   ============================================================ */
.chatbot-toast {
    position: fixed;
    bottom: 136px;
    right: 24px;
    z-index: 9998;
    max-width: 280px;
    padding: 12px 16px;
    border-radius: 12px 12px 4px 12px;
    background: var(--phc-card-bg, #fff);
    color: var(--phc-text, #333);
    border: 1px solid var(--phc-border, #e0e0e0);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    line-height: 1.5;
    animation: chatbot-toast-in 0.4s ease-out;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.chatbot-toast.chatbot-toast--hide {
    animation: chatbot-toast-out 0.3s ease-in forwards;
}

.chatbot-toast-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--phc-text-muted, #999);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chatbot-toast-icon {
    color: #d39e00;
    margin-right: 6px;
}

/* ============================================================
   JANELA DE CHAT
   ============================================================ */
.chatbot-window {
    position: fixed;
    bottom: 138px;
    right: 24px;
    z-index: 9998;
    width: 380px;
    height: 520px;
    border-radius: 16px;
    background: var(--phc-card-bg, #fff);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatbot-slide-up 0.35s ease-out;
    transition: background 0.3s ease;
}

.chatbot-window.chatbot-window--closing {
    animation: chatbot-slide-down 0.25s ease-in forwards;
}

.chatbot-window[hidden] {
    display: none;
}

/* Modo expandido — modal sobre a tela (estilo ChatGPT). Mobile ja eh
   fullscreen pela media query, entao essa regra so importa em desktop. */
.chatbot-window.chatbot-window--expanded {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    transition: width 0.25s ease, height 0.25s ease, top 0.25s ease, border-radius 0.25s ease;
}

/* Em mobile a janela ja eh fullscreen — esconder o botao expandir. */
@media (max-width: 767.98px) {
    .chatbot-btn-expand {
        display: none;
    }
}

/* Quando o chat esta em fullscreen, trava o scroll do portal atras
   pra nao confundir (so a conversa scrolla). */
body.chatbot-fullscreen-lock {
    overflow: hidden;
}

/* ============================================================
   HEADER DO CHAT
   ============================================================ */
.chatbot-header {
    background: linear-gradient(135deg, #8b6914 0%, #6a4f00 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chatbot-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.chatbot-bot-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chatbot-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    font-size: 24px;
    line-height: 1;
}

.chatbot-fab-icon .chatbot-bot-icon,
.chatbot-toast-icon .chatbot-bot-icon {
    border-radius: 50%;
}

.chatbot-fab .chatbot-bot-icon {
    transform: scale(1.18);
}

.chatbot-toast-icon .chatbot-bot-icon {
    width: 28px;
    height: 28px;
}

.chatbot-header-info {
    flex: 1;
    min-width: 0;
}

.chatbot-header-name {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f4d03f;
    color: #6a4f00;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    margin-left: 4px;
    text-transform: uppercase;
}

.chatbot-header-badge.chatbot-header-badge--beta {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.chatbot-disclaimer {
    padding: 6px 12px 8px;
    text-align: center;
    font-size: 10.5px;
    line-height: 1.3;
    color: var(--phc-text-secondary, #888);
    background: var(--phc-card-bg, #fff);
    border-top: 1px solid var(--phc-border, #f0f0f0);
    flex-shrink: 0;
    user-select: none;
}

[data-theme="dark"] .chatbot-disclaimer {
    color: rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 0.08);
}

.chatbot-header-subtitle {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 1px;
}

.chatbot-header-actions {
    display: flex;
    gap: 4px;
}

.chatbot-header-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.chatbot-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Streak badge no header */
.chatbot-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.15);
    color: #f4d03f;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
}

.chatbot-streak-badge[hidden] {
    display: none;
}

/* ============================================================
   AREA DE MENSAGENS
   ============================================================ */
.chatbot-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--phc-bg, #f8f8f8);
    transition: background 0.3s ease;
}

/* Custom scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--phc-border, #ccc);
    border-radius: 3px;
}

/* Mensagem generica */
.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: chatbot-slide-up 0.25s ease-out;
}

/* Bot */
.chatbot-msg--bot {
    align-self: flex-start;
    background: var(--phc-card-bg, #fff);
    color: var(--phc-text, #333);
    border: 1px solid var(--phc-border, #e8e8e8);
    border-bottom-left-radius: 4px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

/* Mensagem de erro/fallback (network/rate_limit/server): shake curto +
   borda suave atraindo atencao pro botao de retry. Aplicada UMA vez via JS. */
.chatbot-msg--error {
    border-color: rgba(231, 76, 60, 0.45);
    animation: chatbot-slide-up 0.25s ease-out, chatbot-shake 0.42s ease-in-out 0.2s;
}

/* User */
.chatbot-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #12557f, #0d4060);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Timestamp */
.chatbot-msg-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 4px;
}

/* Typing indicator */
.chatbot-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 18px;
    background: var(--phc-card-bg, #fff);
    border: 1px solid var(--phc-border, #e8e8e8);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.chatbot-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--phc-text-muted, #999);
    animation: chatbot-typing-dot 1.2s infinite;
}

.chatbot-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing-dot:nth-child(3) { animation-delay: 0.3s; }

.chatbot-typing-label {
    font-size: 11.5px;
    color: var(--phc-text-muted, #999);
    font-style: italic;
    margin-left: 8px;
    align-self: center;
    transition: opacity 0.2s ease;
    opacity: 0.7;
}

/* ============================================================
   CITACOES INLINE [n] -> sup clicavel + tooltip hover
   ============================================================ */
.chatbot-cite {
    display: inline-block;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.7em;
    color: #b88a2b;
    background: rgba(184, 138, 43, 0.10);
    padding: 1px 5px;
    border-radius: 6px;
    margin: 0 1px;
    line-height: 1.2;
    vertical-align: super;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    position: relative;
    text-decoration: none;
}
.chatbot-cite:hover, .chatbot-cite:focus {
    background: #d39e00;
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}
.chatbot-cite[data-tip]:hover::after,
.chatbot-cite[data-tip]:focus::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1612;
    color: #f5e9d0;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
    white-space: normal;
    width: max-content;
    max-width: 260px;
    line-height: 1.45;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    pointer-events: none;
}

/* ============================================================
   FONTES CITADAS — barra ao fim da mensagem (stagger fade-in)
   ============================================================ */
.chatbot-cites-bar {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--phc-border, #e0e0e0);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chatbot-cites-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--phc-text-muted, #999);
    margin-bottom: 4px;
}
.chatbot-cite-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    font-size: 11.5px;
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--phc-text, #333);
    opacity: 0;
    transform: translateY(4px);
    animation: chatbot-cite-in 0.32s ease-out forwards;
    transition: background 0.15s ease;
}
.chatbot-cite-item:hover {
    background: var(--phc-bg, #f8f8f8);
}
.chatbot-cite-n {
    background: #d39e00;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.chatbot-cite-label {
    font-weight: 600;
    color: var(--phc-text, #333);
}
.chatbot-cite-snip {
    color: var(--phc-text-muted, #999);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

@keyframes chatbot-cite-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   QUICK REPLIES — sugestoes [SUGESTOES] do backend ao fim de cada
   resposta. Click preenche o input (nao envia direto). Stagger
   fade-in pra parecer pensado. Mobile: scroll horizontal.
   ============================================================ */
.chatbot-quick-replies {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--phc-border, #e8e8e8);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chatbot-quick-reply {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #d39e00;
    background: rgba(211, 158, 0, 0.06);
    border: 1px solid #d39e00;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    opacity: 0;
    transform: translateY(4px);
    animation: chatbot-quick-reply-in 0.32s ease-out forwards;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    max-width: 100%;
    white-space: normal;
}

.chatbot-quick-reply:hover {
    background: #d39e00;
    color: #fff;
    transform: translateY(0) scale(1.03);
}

.chatbot-quick-reply:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

.chatbot-quick-reply-arrow {
    opacity: 0.6;
    font-size: 13px;
    margin-left: 2px;
}

.chatbot-quick-reply:hover .chatbot-quick-reply-arrow {
    opacity: 1;
    transform: translateX(2px);
}

@keyframes chatbot-quick-reply-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

[data-theme="dark"] .chatbot-quick-replies {
    border-top-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .chatbot-quick-reply {
    color: #f4d03f;
    border-color: #f4d03f;
    background: rgba(244, 208, 63, 0.08);
}

[data-theme="dark"] .chatbot-quick-reply:hover {
    background: #f4d03f;
    color: #1a1a1a;
}

@media (max-width: 480px) {
    .chatbot-quick-replies {
        gap: 5px;
    }
    .chatbot-quick-reply {
        font-size: 12.5px;
        padding: 7px 12px;
    }
}

/* ============================================================
   CHIPS / ACOES RAPIDAS
   ============================================================ */
.chatbot-chips {
    display: flex;
    flex-wrap: nowrap;            /* nunca empilhar — sempre carrossel horizontal */
    gap: 6px;
    padding: 8px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    border-top: 1px solid var(--phc-border, #e8e8e8);
    background: var(--phc-card-bg, #fff);
    transition: background 0.3s, border-color 0.3s;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    /* Indicador visual de "tem mais" em qualquer viewport: fade na direita */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    scrollbar-width: thin;
    scrollbar-color: rgba(211, 158, 0, 0.35) transparent;
}

.chatbot-chips > .chatbot-chip {
    scroll-snap-align: start;
}

/* Scrollbar sutil em desktop (Webkit/Blink) — sinaliza arraste sem competir
   com o conteudo. Em touch o sistema esconde naturalmente. */
.chatbot-chips::-webkit-scrollbar {
    height: 4px;
}
.chatbot-chips::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-chips::-webkit-scrollbar-thumb {
    background: rgba(211, 158, 0, 0.35);
    border-radius: 2px;
}
.chatbot-chips::-webkit-scrollbar-thumb:hover {
    background: rgba(211, 158, 0, 0.6);
}

.chatbot-chip {
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid #d39e00;
    background: transparent;
    color: #d39e00;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-chip:hover {
    background: #d39e00;
    color: #fff;
}

.chatbot-chip:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

/* Carregando/digitando: chips ficam visualmente inertes pra evitar
   click duplo enquanto a resposta nao chega. */
.chatbot-chips--busy .chatbot-chip {
    opacity: 0.45;
    pointer-events: none;
}

[data-theme="dark"] .chatbot-chip {
    border-color: #f4d03f;
    color: #f4d03f;
}

[data-theme="dark"] .chatbot-chip:hover {
    background: #f4d03f;
    color: #1a1a1a;
}

/* ============================================================
   INPUT
   ============================================================ */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--phc-border, #e8e8e8);
    background: var(--phc-card-bg, #fff);
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
    position: relative;
}

.chatbot-input {
    flex: 1;
    border: 1px solid var(--phc-border, #ddd);
    border-radius: 20px;
    padding: 10px 14px;
    /* 16px e o minimo que iOS Safari aceita sem disparar auto-zoom no focus */
    font-size: 16px;
    background: var(--phc-bg, #f8f8f8);
    color: var(--phc-text, #333);
    outline: none;
    transition: border-color 0.2s, background 0.3s, color 0.3s;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: #d39e00;
}

.chatbot-input::placeholder {
    color: var(--phc-text-muted, #999);
}

.chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d39e00 0%, #b8860b 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform 0.15s, opacity 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
}

/* Touch press: feedback tatil-visual de "apertou". */
.chatbot-send-btn:active {
    transform: scale(0.92);
    transition-duration: 0.08s;
}

/* Confirmacao de envio: pulso curto disparado via JS por ~250ms. */
.chatbot-send-btn.chatbot-send-btn--sending {
    animation: chatbot-send-pulse 0.28s ease-out;
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-char-count {
    font-size: 10px;
    color: var(--phc-text-muted, #999);
    position: absolute;
    right: 58px;
    bottom: 4px;
}

/* ============================================================
   PUSH-TO-TALK / MIC BUTTON
   Estilo WhatsApp: hold-to-record, pulse vermelho durante gravacao,
   slide-to-cancel com overlay no input. Hidden se browser nao suporta
   Web Speech API (capability check em JS).
   ============================================================ */
.chatbot-mic-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d39e00 0%, #b8860b 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s ease;
    flex-shrink: 0;
    position: relative;
    /* user-select off pra hold nao selecionar; touch-action none evita
       scroll/zoom durante o press. */
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.chatbot-mic-btn[hidden] {
    display: none;
}

.chatbot-mic-btn:hover {
    transform: scale(1.05);
}

.chatbot-mic-btn:active {
    transform: scale(0.92);
    transition-duration: 0.08s;
}

.chatbot-mic-btn.chatbot-mic-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Estado gravando: vermelho + scale + pulse rings emanando. */
.chatbot-mic-btn.chatbot-mic-btn--recording {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    transform: scale(1.15);
}

/* Cancel mode (apenas em modo HOLD): cinza pulsante, icone vira lixeira. */
.chatbot-mic-btn.chatbot-mic-btn--canceling {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    transform: scale(1.05);
}

/* Tap-mode: gravacao "ativa, mao livre". Mantem o botao VERMELHO
   (igual hold) — usuario percebe que esta gravando, nao parado. So
   o icone muda (mic -> stop-fill via JS). Pulse continua vermelho.
   Visual de "stop ativo" estilo whatsapp moderno. */
.chatbot-mic-btn.chatbot-mic-btn--tap {
    /* Mesmo gradiente do --recording — sem mudanca de cor. */
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    transform: scale(1.18);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.22);
    animation: chatbot-mic-btn-tap-bounce 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-mic-btn--tap .chatbot-mic-pulse {
    border-color: #e74c3c;
}

/* Tooltip discreto abaixo do botao em tap-mode dizendo "toque pra parar".
   Fade-in delayed (700ms) pra nao roubar atencao do waveform que e o
   feedback principal de "estou gravando". */
.chatbot-mic-btn.chatbot-mic-btn--tap::after {
    content: "toque pra parar";
    position: absolute;
    bottom: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    background: rgba(26, 22, 18, 0.92);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: chatbot-mic-tap-tooltip-in 0.3s ease-out 0.7s forwards;
    z-index: 12;
}

.chatbot-mic-btn.chatbot-mic-btn--tap::before {
    /* Setinha apontando pro botao */
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    right: 50%;
    transform: translateX(50%);
    border: 4px solid transparent;
    border-top-color: rgba(26, 22, 18, 0.92);
    pointer-events: none;
    opacity: 0;
    animation: chatbot-mic-tap-tooltip-in 0.3s ease-out 0.7s forwards;
    z-index: 12;
}

@keyframes chatbot-mic-tap-tooltip-in {
    from { opacity: 0; transform: translateX(50%) translateY(2px); }
    to   { opacity: 1; transform: translateX(50%) translateY(0); }
}

@keyframes chatbot-mic-btn-tap-bounce {
    0%   { transform: scale(1.05); }
    55%  { transform: scale(1.28); }
    100% { transform: scale(1.18); }
}

/* Pulse rings — 2 camadas com delay diferente pra efeito ondulatorio. */
.chatbot-mic-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    opacity: 0;
    pointer-events: none;
}

.chatbot-mic-btn--recording .chatbot-mic-pulse {
    animation: chatbot-mic-pulse-ring 1.4s ease-out infinite;
}

.chatbot-mic-btn--recording .chatbot-mic-pulse--2 {
    animation-delay: 0.6s;
}

.chatbot-mic-btn--canceling .chatbot-mic-pulse {
    border-color: #95a5a6;
}

@keyframes chatbot-mic-pulse-ring {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ============================================================
   INPUT-AREA durante gravacao
   Esconde o input pra o overlay nao sobrepor texto digitado.
   O input some via opacity+visibility (mantem a largura no
   layout flex pra evitar reflow estranho). Restaura quando para.
   ============================================================ */
.chatbot-input-area {
    position: relative;
}

.chatbot-input-area--recording .chatbot-input {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease-out;
}

/* Overlay ocupa o lugar exato do input — mesma altura, mesmo radius,
   mesma margem. Nao sobrepoe nada porque o input esta invisivel.
   right: 100px reserva espaco pra send-btn (36) + gap (8) + mic-btn (36)
   + gap (8) + padding-right (12) = 100px no desktop. Mobile recalcula
   abaixo (mic-btn vai pra 40px). Sem essa folga, label longa empurrava
   o timer pra DENTRO da area do botao mic e o cursor virava I-beam em
   cima dele, dificultando o clique. */
.chatbot-mic-overlay {
    position: absolute;
    left: 12px;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    background: rgba(231, 76, 60, 0.10);
    border: 1px solid rgba(231, 76, 60, 0.40);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 8px;
    font-size: 13px;
    color: var(--phc-text, #333);
    animation: chatbot-mic-overlay-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Texto interno e visual, nao interativo. Sem isso o label (text node)
       capturava o ponteiro e o cursor virava I-beam mesmo perto do botao
       mic — confundia "vou clicar pra parar" com "vou selecionar texto". */
    pointer-events: none;
}

/* O cancel-btn DENTRO do overlay precisa receber clique apesar do
   pointer-events:none acima. Restaura nele explicitamente. */
.chatbot-mic-overlay-cancel-btn {
    pointer-events: auto;
}

.chatbot-mic-overlay[hidden] { display: none; }

/* Botao X — cancelar (substitui o icone-microfone do overlay antigo).
   Em hold-mode tambem aparece, mas drag-to-cancel ainda funciona. */
.chatbot-mic-overlay-cancel-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(231, 76, 60, 0.18);
    color: #e74c3c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.chatbot-mic-overlay-cancel-btn:hover {
    background: rgba(231, 76, 60, 0.28);
    transform: scale(1.08);
}

.chatbot-mic-overlay-cancel-btn:active {
    transform: scale(0.92);
}

/* Waveform — fallback CSS (5 barras com pulso defasado).
   Quando getUserMedia + AudioContext disponiveis, o canvas-live abaixo
   substitui visualmente os spans (le amplitude REAL via AnalyserNode).
   Os spans ficam como fallback caso permissao negada / API indisponivel. */
.chatbot-mic-waveform {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 18px;
    /* Largura responsiva — desktop ganha mais espaco pro canvas vivo */
    width: 64px;
    flex-shrink: 0;
}

.chatbot-mic-waveform > span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #e74c3c;
    animation: chatbot-mic-wave 0.9s ease-in-out infinite;
}

.chatbot-mic-waveform > span:nth-child(1) { animation-delay: 0s;    height: 8px; }
.chatbot-mic-waveform > span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.chatbot-mic-waveform > span:nth-child(3) { animation-delay: 0.30s; height: 18px; }
.chatbot-mic-waveform > span:nth-child(4) { animation-delay: 0.45s; height: 12px; }
.chatbot-mic-waveform > span:nth-child(5) { animation-delay: 0.60s; height: 9px; }

@keyframes chatbot-mic-wave {
    0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
    50%      { transform: scaleY(1.0);  opacity: 1;    }
}

/* Canvas com waveform REAL. Hidden por default (fallback CSS aparece);
   JS adiciona .chatbot-mic-waveform--live quando AnalyserNode esta vivo. */
.chatbot-mic-waveform-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
}

.chatbot-mic-waveform--live .chatbot-mic-waveform-canvas {
    display: block;
}

.chatbot-mic-waveform--live > span {
    /* Quando o canvas esta vivo, esconde as barras CSS sem perder o
       espaco do container (canvas eh absolute). */
    visibility: hidden;
}

/* Desktop ganha um pouco mais de respiro pro canvas — em mobile o
   .chatbot-mic-overlay ja eh apertado. */
@media (min-width: 768px) {
    .chatbot-mic-waveform { width: 96px; }
}

.chatbot-mic-overlay-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
    color: var(--phc-text-muted, #666);
    min-width: 0;
    font-size: 13px;
    transition: color 0.2s, font-weight 0.2s;
}

/* Quando a transcricao comeca a chegar, label vira o protagonista do
   overlay: maior, peso medio, cor escura. Estilo whatsapp moderno onde
   o texto reconhecido domina o espaco visual. */
.chatbot-mic-overlay-label--has-preview {
    font-style: normal;
    color: var(--phc-text, #1a1612);
    font-weight: 500;
    font-size: 14.5px;
    letter-spacing: 0.1px;
}

[data-theme="dark"] .chatbot-mic-overlay-label--has-preview {
    color: #f4ecdc;
}

.chatbot-mic-timer {
    font-size: 12px;
    font-weight: 600;
    color: #e74c3c;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.chatbot-mic-overlay-cancel {
    font-size: 11px;
    color: var(--phc-text-muted, #999);
    flex-shrink: 0;
    opacity: 0.7;
}

@keyframes chatbot-mic-overlay-in {
    from { opacity: 0; transform: translateY(-50%) translateX(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
}

/* Modo cancelar (drag-to-cancel em hold): overlay vermelho mais forte. */
.chatbot-input-area--canceling .chatbot-mic-overlay {
    background: rgba(231, 76, 60, 0.20);
    border-color: rgba(231, 76, 60, 0.65);
}

.chatbot-input-area--canceling .chatbot-mic-overlay-label {
    color: #e74c3c;
    font-weight: 600;
}

.chatbot-input-area--canceling .chatbot-mic-waveform > span {
    background: #c0392b;
    animation-play-state: paused;
}

/* Tap-mode: overlay verde-claro pra reforcar "modo travado".
   Esconde dica "arraste pra cancelar" — em tap-mode o X e o caminho. */
.chatbot-input-area--tap .chatbot-mic-overlay {
    background: rgba(39, 174, 96, 0.10);
    border-color: rgba(39, 174, 96, 0.40);
}

.chatbot-input-area--tap .chatbot-mic-waveform > span {
    background: #27ae60;
}

.chatbot-input-area--tap .chatbot-mic-timer {
    color: #1e874b;
}

.chatbot-input-area--tap .chatbot-mic-overlay-cancel-btn {
    background: rgba(39, 174, 96, 0.18);
    color: #1e874b;
}

.chatbot-input-area--tap .chatbot-mic-overlay-cancel {
    display: none;
}

[data-theme="dark"] .chatbot-mic-overlay {
    background: rgba(231, 76, 60, 0.14);
    color: var(--phc-text, #ddd);
}

[data-theme="dark"] .chatbot-input-area--tap .chatbot-mic-overlay {
    background: rgba(39, 174, 96, 0.14);
}

@media (max-width: 767.98px) {
    .chatbot-mic-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .chatbot-mic-overlay {
        /* Mobile: send (36) + gap (8) + mic (40) + gap (8) + pad (12) = 104px.
           Sem essa folga, o timer encostava no botao mic vermelho e
           visualmente parecia overlap. */
        right: 104px;
        font-size: 13px;
        gap: 8px;
        padding: 0 10px 0 6px;
    }
    /* Em mobile, esconde a dica textual de cancelar (overlay tem o X
       como acao primaria; em hold-mode o drag ja e gestual). */
    .chatbot-mic-overlay-cancel {
        display: none;
    }
    /* Em viewport bem estreito (<360px) reduz o waveform a 3 barras
       em vez de esconder — feedback de "estou ouvindo" e critico,
       nao dispensavel. O texto ainda cabe porque label tem ellipsis. */
    @media (max-width: 359.98px) {
        .chatbot-mic-waveform { gap: 1.5px; width: 48px; }
        .chatbot-mic-waveform > span:nth-child(4),
        .chatbot-mic-waveform > span:nth-child(5) { display: none; }
    }
}

/* ============================================================
   ACHIEVEMENT POPUP
   ============================================================ */
.chatbot-achievement {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: linear-gradient(135deg, #f4d03f, #d39e00);
    color: #4a3600;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 20px rgba(211, 158, 0, 0.4);
    animation: chatbot-badge-pop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-achievement-icon {
    font-size: 18px;
}

.chatbot-achievement[hidden] {
    display: none;
}

/* ============================================================
   CARDS RICOS (fatos, manchetes, jornais)
   ============================================================ */
.chatbot-card {
    border-left: 3px solid var(--phc-gold, #d39e00);
    padding: 10px 14px;
    margin: 6px 0 2px;
    border-radius: 0 10px 10px 0;
    background: var(--phc-bg, #f8f9fa);
    font-size: 13px;
    line-height: 1.65;
    transition: background 0.3s, border-color 0.3s;
    animation: chatbot-slide-up 0.3s ease-out;
}

.chatbot-card--fato {
    border-left-color: var(--phc-gold, #d39e00);
}

.chatbot-card--manchete {
    border-left-color: var(--phc-teal, #12557f);
}

.chatbot-card--jornal {
    border-left-color: #8b6914;
}

.chatbot-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.7;
}

.chatbot-card-header--fato { color: var(--phc-gold, #d39e00); }
.chatbot-card-header--manchete { color: var(--phc-teal, #12557f); }
.chatbot-card-header--jornal { color: #8b6914; }

[data-theme="dark"] .chatbot-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .chatbot-card-header--fato { color: #f4d03f; }
[data-theme="dark"] .chatbot-card-header--manchete { color: #5ba3cf; }
[data-theme="dark"] .chatbot-card-header--jornal { color: #c9a84c; }

/* ============================================================
   LINKS EM MENSAGENS DO BOT
   ============================================================ */
.chatbot-msg--bot a {
    color: var(--phc-teal, #12557f);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.chatbot-msg--bot a:hover {
    color: var(--phc-gold, #d39e00);
}

[data-theme="dark"] .chatbot-msg--bot a {
    color: #5ba3cf;
}

[data-theme="dark"] .chatbot-msg--bot a:hover {
    color: #f4d03f;
}

/* ============================================================
   ACTION LINKS BAR (links deterministicos pos-resposta)
   ============================================================ */
.chatbot-links-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--phc-border, #e8e8e8);
    animation: chatbot-slide-up 0.3s ease-out;
}

.chatbot-action-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--phc-teal, #12557f) !important;
    background: var(--phc-bg, #f8f9fa);
    border: 1px solid var(--phc-border, #e0e0e0);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatbot-action-link:hover {
    background: var(--phc-teal, #12557f);
    color: #fff !important;
    border-color: var(--phc-teal, #12557f);
}

.chatbot-action-link:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

.chatbot-action-link i {
    font-size: 11px;
    flex-shrink: 0;
}

[data-theme="dark"] .chatbot-links-bar {
    border-top-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .chatbot-action-link {
    color: #5ba3cf !important;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .chatbot-action-link:hover {
    background: #5ba3cf;
    color: #fff !important;
    border-color: #5ba3cf;
}

/* ============================================================
   RETRY BUTTON (fallback quando API falha)
   ============================================================ */
.chatbot-retry-wrap {
    margin-top: 10px;
}

.chatbot-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--phc-teal, #12557f);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-retry-btn:hover {
    background: var(--phc-gold, #d39e00);
    transform: scale(1.03);
}

.chatbot-retry-btn:active {
    transform: scale(0.95);
    transition-duration: 0.08s;
}

.chatbot-retry-btn i {
    font-size: 13px;
}

[data-theme="dark"] .chatbot-retry-btn {
    background: #5ba3cf;
}

[data-theme="dark"] .chatbot-retry-btn:hover {
    background: #f4d03f;
    color: #333;
}

/* Variante "quiet" — usado quando exibimos mensagem degradada com
   atalhos. Vira link discreto, sem ser CTA principal. Os 3 quick
   replies viram o caminho preferido. */
.chatbot-retry-btn.chatbot-retry-btn--quiet {
    background: transparent;
    color: var(--phc-text-muted, #888);
    padding: 4px 0;
    font-size: 11px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--phc-border, #ddd);
}

.chatbot-retry-btn.chatbot-retry-btn--quiet:hover {
    background: transparent;
    color: var(--phc-gold, #d39e00);
    text-decoration-color: currentColor;
    transform: none;
}

[data-theme="dark"] .chatbot-retry-btn.chatbot-retry-btn--quiet {
    color: #999;
}

[data-theme="dark"] .chatbot-retry-btn.chatbot-retry-btn--quiet:hover {
    background: transparent;
    color: #f4d03f;
}

/* ============================================================
   RESPONSIVE - MOBILE FULLSCREEN
   Breakpoint 767.98px alinha com Bootstrap d-md-none (bottom-tab-nav
   nativa do PHC). safe-area-inset-* cobre iPhone com notch / home bar.
   ============================================================ */

/* Desktop: input pequeno; mobile mantem 16px (anti auto-zoom iOS). */
@media (min-width: 768px) {
    .chatbot-input { font-size: 13px; padding: 8px 14px; }
}

@media (max-width: 767.98px) {
    .chatbot-window {
        width: 100vw;
        /* dvh = dynamic viewport (segue real, evita input sumir atras
           do teclado virtual no iOS Safari). svh fallback antigo. */
        height: 100svh;
        height: 100dvh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        animation: chatbot-mobile-slide-up 0.28s ease-out;
    }

    /* FAB acima da bottom-tab-nav nativa (56px) + safe-area do notch. */
    .chatbot-fab {
        bottom: calc(56px + 12px + env(safe-area-inset-bottom, 0px));
        right: 12px;
        width: 64px;
        height: 64px;
        font-size: 22px;
    }

    /* Em mobile, com o chat aberto a janela e fullscreen — o FAB com
       chevron-down ficaria sobre o botao mic/send do input. Esconde
       (o usuario fecha pelo X do header). */
    .chatbot-fab.chatbot-fab--open {
        display: none;
    }

    /* Send button mobile: 40x40 visual pra touch confortavel
       (Apple HIG sugere 44px; com padding em volta da area do input,
       a hit-area efetiva ja passa de 44). */
    .chatbot-send-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Header close: visual 32px mas hit-area 44x44 via padding+box-sizing. */
    .chatbot-header-btn {
        width: 32px;
        height: 32px;
        position: relative;
    }
    .chatbot-header-btn::before {
        /* expande a area de toque sem afetar layout visual */
        content: '';
        position: absolute;
        inset: -6px;
    }

    .chatbot-toast {
        bottom: calc(56px + 72px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

@keyframes chatbot-mobile-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ============================================================
   AJUSTES DE CITACAO E LISTA DE FONTES PARA TOUCH / VIEWPORT ESTREITO
   ============================================================ */

/* Touch device: tooltip CSS-only de hover nao funciona — desabilita.
   Confiamos na .chatbot-cites-bar embaixo que sempre mostra os dados. */
@media (hover: none) {
    .chatbot-cite[data-tip]:hover::after,
    .chatbot-cite[data-tip]:focus::after {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Citacao [n]: aumentar area de toque sem aumentar visual. */
    .chatbot-cite {
        font-size: 0.78em;
        padding: 2px 8px;
        margin: 0 2px;
        min-width: 22px;
        text-align: center;
    }

    /* Lista de fontes citadas: chip+label numa linha, snippet na de baixo. */
    .chatbot-cite-item {
        flex-wrap: wrap;
        row-gap: 2px;
    }
    .chatbot-cite-label {
        flex: 1 0 calc(100% - 28px);
    }
    .chatbot-cite-snip {
        flex: 0 0 100%;
        margin-left: 26px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Loading text progressivo: cai pra linha de baixo em vez de espremer. */
    .chatbot-typing { flex-wrap: wrap; }
    .chatbot-typing-label {
        flex: 1 0 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    /* Mask + scroll-snap dos chips agora sao globais (regra base). */

    /* Achievement popup nao estoura viewport pequeno. */
    .chatbot-achievement {
        max-width: calc(100% - 32px);
        font-size: 11px;
        padding: 8px 14px;
        top: 56px;
    }
}

/* ============================================================
   DARK MODE OVERRIDES (onde var() nao e suficiente)
   ============================================================ */
[data-theme="dark"] .chatbot-fab {
    box-shadow: 0 4px 16px rgba(244, 208, 63, 0.25);
}

[data-theme="dark"] .chatbot-window {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .chatbot-toast {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .chatbot-msg--user {
    background: linear-gradient(135deg, #155d8a, #12557f);
}

[data-theme="dark"] .chatbot-send-btn {
    background: linear-gradient(135deg, #f4d03f 0%, #d39e00 100%);
    color: #1a1a1a;
}
