/* DFW Noise floating Joey agent — v1. All classes prefixed dfw-agent- */
.dfw-agent-root{position:fixed;right:18px;bottom:18px;z-index:9999;font-family:inherit;
  --dfw-navy:#0B2A5B;--dfw-red:#D2202F;--dfw-line:#d9dee8}
.dfw-agent-root *{box-sizing:border-box}

/* Floating button */
.dfw-agent-fab{display:flex;align-items:center;gap:10px;background:var(--dfw-navy);
  border:3px solid #fff;border-radius:999px;padding:5px 16px 5px 5px;cursor:pointer;
  box-shadow:0 8px 28px rgba(4,20,48,.38);color:#fff;font-size:15px;font-weight:700}
.dfw-agent-fab:hover{background:#123a7d}
.dfw-agent-fab:focus-visible,.dfw-agent-send:focus-visible,.dfw-agent-chip:focus-visible,
.dfw-agent-action:focus-visible{outline:3px solid var(--dfw-red);outline-offset:2px}
.dfw-agent-face{width:54px;height:54px;border-radius:50%;overflow:hidden;flex:0 0 54px;
  background:#fff;position:relative}
.dfw-agent-face img,.dfw-agent-face video{width:100%;height:100%;object-fit:cover;display:block}
.dfw-agent-live-dot{position:absolute;right:2px;bottom:2px;width:13px;height:13px;border-radius:50%;
  background:#2ecc71;border:2px solid #fff}
.dfw-agent-fab-text{text-align:left;line-height:1.15}
.dfw-agent-fab-text small{display:block;font-weight:600;font-size:11px;opacity:.85}
@keyframes dfwAgentPulse{0%{box-shadow:0 0 0 0 rgba(210,32,47,.55)}100%{box-shadow:0 0 0 16px rgba(210,32,47,0)}}
.dfw-agent-fab.pulse{animation:dfwAgentPulse 1.1s ease-out 2}

/* Greeting caption bubble (shows before the panel is opened) */
.dfw-agent-bubble{position:absolute;right:0;bottom:78px;width:270px;max-width:calc(100vw - 36px);
  background:#fff;color:#14213d;border:1px solid var(--dfw-line);border-radius:14px;
  box-shadow:0 10px 30px rgba(4,20,48,.25);padding:12px 14px;font-size:15px;line-height:1.4}
.dfw-agent-bubble:after{content:"";position:absolute;right:34px;bottom:-8px;width:16px;height:16px;
  background:#fff;border-right:1px solid var(--dfw-line);border-bottom:1px solid var(--dfw-line);
  transform:rotate(45deg)}
.dfw-agent-bubble strong{color:var(--dfw-navy)}
.dfw-agent-bubble .dfw-agent-bubble-close{position:absolute;top:4px;right:8px;background:none;border:0;
  font-size:16px;cursor:pointer;color:#6b7686;padding:2px 4px}
.dfw-agent-hidden{display:none!important}

/* Panel */
.dfw-agent-panel{position:absolute;right:0;bottom:78px;width:372px;max-width:calc(100vw - 24px);
  height:560px;max-height:calc(100dvh - 110px);background:#fff;border:1px solid var(--dfw-line);
  border-radius:18px;box-shadow:0 18px 50px rgba(4,20,48,.35);display:flex;flex-direction:column;overflow:hidden}
.dfw-agent-head{background:var(--dfw-navy);color:#fff;padding:12px 14px;display:flex;gap:10px;align-items:center}
.dfw-agent-head .dfw-agent-face{width:44px;height:44px;flex-basis:44px}
.dfw-agent-head-titles{flex:1;line-height:1.2}
.dfw-agent-head-titles strong{font-size:16px}
.dfw-agent-head-titles small{display:block;opacity:.85;font-size:12px}
.dfw-agent-iconbtn{background:rgba(255,255,255,.14);border:0;color:#fff;border-radius:8px;
  width:34px;height:34px;font-size:16px;cursor:pointer}
.dfw-agent-iconbtn[aria-pressed="false"]{opacity:.55}
.dfw-agent-stage{background:#0a1c3e;display:flex;justify-content:center;padding:10px 10px 0}
.dfw-agent-stage-frame{width:132px;height:132px;border-radius:50%;overflow:hidden;border:3px solid #fff}
.dfw-agent-stage-frame img,.dfw-agent-stage-frame video{width:100%;height:100%;object-fit:cover;display:block}
.dfw-agent-stage-frame{position:relative}
.dfw-agent-stage-frame video.dfw-agent-vclip{position:absolute;inset:0;object-position:50% 12%}
.dfw-agent-caption{background:#0a1c3e;color:#fff;padding:10px 16px 14px;text-align:center;
  font-size:15.5px;line-height:1.45;min-height:52px}
.dfw-agent-caption:empty:before{content:"Captions will appear here.";opacity:.55;font-size:13px}
.dfw-agent-msgs{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f4f6fb}
.dfw-agent-msg{max-width:88%;padding:9px 12px;border-radius:14px;font-size:14.5px;line-height:1.45}
.dfw-agent-msg.bot{background:#fff;border:1px solid var(--dfw-line);align-self:flex-start;border-bottom-left-radius:4px}
.dfw-agent-msg.user{background:var(--dfw-navy);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.dfw-agent-action{display:inline-block;margin-top:8px;background:var(--dfw-red);color:#fff!important;
  text-decoration:none;font-weight:700;padding:10px 14px;border-radius:10px;font-size:15px}
.dfw-agent-action.secondary{background:var(--dfw-navy)}
.dfw-agent-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px 4px;background:#f4f6fb}
.dfw-agent-chip{background:#fff;border:1.5px solid var(--dfw-navy);color:var(--dfw-navy);border-radius:999px;
  padding:7px 12px;font-size:13.5px;font-weight:700;cursor:pointer}
.dfw-agent-chip:hover{background:var(--dfw-navy);color:#fff}
.dfw-agent-form{display:flex;gap:6px;padding:10px;border-top:1px solid var(--dfw-line);background:#fff}
.dfw-agent-input{flex:1;border:1.5px solid var(--dfw-line);border-radius:10px;padding:11px 12px;font-size:15px;min-width:0}
.dfw-agent-send{background:var(--dfw-navy);color:#fff;border:0;border-radius:10px;padding:0 16px;
  font-weight:700;font-size:15px;cursor:pointer}
.dfw-agent-mic{background:#fff;border:1.5px solid var(--dfw-line);border-radius:10px;width:44px;font-size:17px;cursor:pointer}
.dfw-agent-mic.listening{border-color:var(--dfw-red);background:#fdeef0}
.dfw-agent-fineprint{padding:0 12px 10px;font-size:11.5px;color:#6b7686;background:#fff}
@media (max-width:520px){
  .dfw-agent-root{right:12px;bottom:12px}
  .dfw-agent-panel{bottom:74px}
  .dfw-agent-fab-text span{display:none}
}
@media (prefers-reduced-motion:reduce){.dfw-agent-fab.pulse{animation:none}}
