/* ---------------------------------------------------------------
   DTF Station Global Assistant — chat widget
   Reuses the design tokens from main.css, so the bubble follows the
   brand with no edits here.

   2026-09-05: the var() FALLBACKS in this file used to carry the old
   brand (#34c9d4, the gold→teal sweep, #0b0b0d, the SF stack). Those
   only apply if main.css fails to load, so they were a second, stale
   design system waiting for a bad cache. They now restate the current
   tokens instead of contradicting them.

   The launcher and badge no longer take --grad. That gradient is now
   ink→teal because it paints TEXT elsewhere on the site; as a fill it
   is nearly black, and the dark glyph sitting on it disappeared. Solid
   --accent with a dark glyph is the same pairing every button uses.
----------------------------------------------------------------*/
.dtfa-launcher{
  position:fixed;bottom:22px;right:22px;z-index:900;
  width:58px;height:58px;border:0;border-radius:50%;cursor:pointer;
  background:var(--accent,#49BFBC);
  box-shadow:0 2px 6px rgba(20,24,26,.05),0 18px 40px -18px rgba(20,24,26,.34);
  display:flex;align-items:center;justify-content:center;
  transition:transform .25s ease,box-shadow .25s ease;
}
.dtfa-launcher:hover{transform:translateY(-2px) scale(1.03)}
.dtfa-launcher svg{width:26px;height:26px;stroke:var(--ink,#202124);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dtfa-launcher .dtfa-ic-close{display:none}
.dtfa-open .dtfa-launcher .dtfa-ic-chat{display:none}
.dtfa-open .dtfa-launcher .dtfa-ic-close{display:block}

.dtfa-panel{
  position:fixed;bottom:92px;right:22px;z-index:900;
  width:min(384px,calc(100vw - 32px));
  height:min(580px,calc(100vh - 130px));
  background:#fff;border:1px solid var(--line,#dadce0);
  border-radius:var(--r-card,28px);overflow:hidden;
  display:flex;flex-direction:column;
  box-shadow:0 2px 6px rgba(20,24,26,.05),0 40px 72px -34px rgba(20,24,26,.34);
  font-family:var(--font,Poppins,"Noto Sans KR",-apple-system,BlinkMacSystemFont,sans-serif);
  opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}
.dtfa-open .dtfa-panel{opacity:1;transform:none;pointer-events:auto}

/* Header */
.dtfa-head{padding:16px 18px;border-bottom:1px solid var(--line,#dadce0);display:flex;align-items:center;gap:11px}
.dtfa-badge{width:34px;height:34px;border-radius:10px;flex:0 0 auto;background:var(--accent,#49BFBC);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--ink,#202124);font-size:14px}
.dtfa-head h4{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em;color:var(--ink,#202124)}
.dtfa-head p{margin:1px 0 0;font-size:12px;color:var(--ink-faint,#5c6167)}
.dtfa-head .dtfa-x{margin-left:auto;background:none;border:0;cursor:pointer;padding:6px;color:var(--ink-faint,#5c6167);line-height:0;border-radius:8px}
.dtfa-head .dtfa-x:hover{background:var(--bg-alt,#f8f9fa);color:var(--ink,#202124)}
.dtfa-head .dtfa-x svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

/* Demo-mode notice */
.dtfa-note{display:none;font-size:11.5px;line-height:1.4;color:#7a5b00;background:#fff7e0;border-bottom:1px solid #f0e2b0;padding:8px 18px}
.dtfa-demo .dtfa-note{display:block}

/* Message list */
.dtfa-log{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg,#fbfbfd)}
.dtfa-msg{max-width:85%;font-size:14px;line-height:1.5;padding:10px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word}
.dtfa-msg.bot{align-self:flex-start;background:var(--bg-alt,#f8f9fa);color:var(--ink,#202124);border-bottom-left-radius:5px}
.dtfa-msg.user{align-self:flex-end;background:var(--accent,#49BFBC);color:var(--ink,#202124);border-bottom-right-radius:5px}
.dtfa-msg strong{font-weight:600}
.dtfa-msg a{color:var(--accent-ink,#28716F);text-decoration:underline}

/* Typing dots */
.dtfa-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 14px;background:var(--bg-alt,#f8f9fa);border-radius:16px;border-bottom-left-radius:5px}
.dtfa-typing span{width:6px;height:6px;border-radius:50%;background:var(--ink-faint,#5c6167);animation:dtfa-bounce 1.2s infinite ease-in-out}
.dtfa-typing span:nth-child(2){animation-delay:.15s}
.dtfa-typing span:nth-child(3){animation-delay:.3s}
@keyframes dtfa-bounce{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}

/* Composer */
.dtfa-form{display:flex;align-items:flex-end;gap:8px;padding:12px 14px;border-top:1px solid var(--line,#dadce0);background:#fff}
.dtfa-form textarea{flex:1;resize:none;border:1px solid var(--line,#dadce0);border-radius:18px;padding:10px 14px;font-family:inherit;font-size:14px;line-height:1.4;max-height:96px;outline:none;transition:border-color .18s;color:var(--ink,#202124)}
.dtfa-form textarea:focus{border-color:var(--accent,#49BFBC)}
.dtfa-send{flex:0 0 auto;width:38px;height:38px;border:0;border-radius:50%;cursor:pointer;background:var(--accent,#49BFBC);display:flex;align-items:center;justify-content:center;transition:.18s}
.dtfa-send:hover{background:var(--accent-hover,#40B5B2)}
.dtfa-send:disabled{opacity:.4;cursor:default}
.dtfa-send svg{width:18px;height:18px;stroke:var(--ink,#202124);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.dtfa-foot{text-align:center;font-size:10.5px;color:var(--ink-faint,#5c6167);padding:0 0 9px;background:#fff}

@media (max-width:480px){
  .dtfa-panel{bottom:0;right:0;width:100vw;height:100dvh;border-radius:0}
  .dtfa-launcher{bottom:16px;right:16px}
}

/* End chat button (header) */
.dtfa-head .dtfa-end{margin-left:auto;background:none;border:1px solid var(--line,#dadce0);color:var(--ink-faint,#5c6167);font-family:inherit;font-size:11px;font-weight:600;line-height:1;padding:6px 10px;border-radius:var(--r-chip,999px);cursor:pointer;white-space:nowrap;transition:.2s}
.dtfa-head .dtfa-end:hover{color:var(--ink,#202124);border-color:#9aa0a6;background:var(--bg-alt,#f8f9fa)}
.dtfa-head .dtfa-x{margin-left:0}
