/* ============================================================
   Tech-D Automation Advisor — widget styles
   Drop in as assets/agent.css

   THEMING: every colour is a CSS custom property namespaced --tda-*.
   Override them once in your own stylesheet (after this file) to
   match the site. Nothing else needs editing.
   ============================================================ */

.tda {
  --tda-bg:        #0d1117;
  --tda-panel:     #161b22;
  --tda-panel-2:   #1c2430;
  --tda-line:      #2a3441;
  --tda-ink:       #e6edf3;
  --tda-dim:       #8b98a5;
  --tda-accent:    #2dd4bf;
  --tda-accent-ink:#052e2b;
  --tda-warm:      #f0b429;
  --tda-hot:       #fb7185;
  --tda-radius:    14px;
  --tda-shadow:    0 20px 50px rgba(0,0,0,.45);

  color: var(--tda-ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tda *, .tda *::before, .tda *::after { box-sizing: border-box; }

/* ---------- shell ---------- */
.tda-panel {
  background: var(--tda-panel);
  border: 1px solid var(--tda-line);
  border-radius: var(--tda-radius);
  overflow: hidden;
  box-shadow: var(--tda-shadow);
  display: flex;
  flex-direction: column;
}
.tda-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--tda-line);
  background: var(--tda-panel-2);
  flex: none;
}
.tda-head b { font-size: 14px; font-weight: 700; }
.tda-step { font-size: 12px; color: var(--tda-dim); margin-left: auto; }
.tda-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tda-accent); flex: none;
  animation: tda-pulse 2.4s infinite;
}
@keyframes tda-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,212,191,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}
.tda-close {
  background: none; border: 0; color: var(--tda-dim);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px;
  margin-left: 6px;
}
.tda-close:hover, .tda-close:focus-visible { color: var(--tda-ink); outline: none; }

/* ---------- conversation ---------- */
.tda-stream { padding: 18px 16px; min-height: 170px; overflow-y: auto; flex: 1 1 auto; }
.tda-msg { margin-bottom: 14px; max-width: 88%; animation: tda-rise .32s ease both; }
@keyframes tda-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tda-msg .tda-bubble {
  background: var(--tda-panel-2);
  border: 1px solid var(--tda-line);
  border-radius: 4px 14px 14px 14px;
  padding: 11px 14px; font-size: 15px;
}
.tda-msg.tda-me { margin-left: auto; }
.tda-msg.tda-me .tda-bubble {
  background: rgba(45,212,191,.13);
  border-color: rgba(45,212,191,.3);
  border-radius: 14px 4px 14px 14px;
  padding: 9px 13px; font-size: 14.5px; color: #bff5ee;
}
.tda-typing span {
  display: inline-block; width: 6px; height: 6px; margin-right: 3px;
  border-radius: 50%; background: var(--tda-dim); animation: tda-blink 1.3s infinite;
}
.tda-typing span:nth-child(2) { animation-delay: .18s; }
.tda-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes tda-blink { 0%,60%,100% { opacity:.25 } 30% { opacity:1 } }

/* ---------- input ---------- */
.tda-choices { padding: 0 16px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tda-chip {
  background: transparent; color: var(--tda-ink);
  border: 1px solid var(--tda-line); border-radius: 999px;
  padding: 9px 15px; font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.tda-chip:hover, .tda-chip:focus-visible {
  border-color: var(--tda-accent); color: var(--tda-accent);
  background: rgba(45,212,191,.08); outline: none;
}
.tda-field { display: flex; gap: 8px; flex-wrap: wrap; }
.tda-field input {
  flex: 1 1 200px; background: var(--tda-bg);
  border: 1px solid var(--tda-line); color: var(--tda-ink);
  border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 15px;
}
.tda-field input:focus { outline: none; border-color: var(--tda-accent); }
.tda-btn {
  background: var(--tda-accent); color: var(--tda-accent-ink);
  border: 0; border-radius: 10px; padding: 11px 18px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: background .14s;
}
.tda-btn:hover, .tda-btn:focus-visible { background: #5eead4; outline: none; }
.tda-btn[disabled] { opacity: .5; cursor: default; }
.tda-btn-ghost {
  background: transparent; color: var(--tda-accent);
  border: 1px solid rgba(45,212,191,.4); font-weight: 600;
}
.tda-btn-ghost:hover, .tda-btn-ghost:focus-visible { background: rgba(45,212,191,.1); }

/* ---------- plan ---------- */
.tda-plan { padding: 4px 16px 20px; animation: tda-rise .4s ease both; }
.tda-plan h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--tda-accent); margin: 18px 0 10px; font-weight: 700;
}
.tda-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 4px 0 6px; }
.tda-stat {
  background: var(--tda-panel-2); border: 1px solid var(--tda-line);
  border-radius: 11px; padding: 12px 10px; text-align: center;
}
.tda-stat b { display: block; font-size: 21px; letter-spacing: -.02em; color: var(--tda-accent); line-height: 1.2; }
.tda-stat i { display: block; font-style: normal; font-size: 10.5px; color: var(--tda-dim); margin-top: 4px; letter-spacing: .03em; }
.tda-rec {
  background: var(--tda-panel-2); border: 1px solid var(--tda-line);
  border-left: 3px solid var(--tda-accent); border-radius: 0 11px 11px 0;
  padding: 13px 15px; margin-bottom: 9px;
}
.tda-rec.tda-second { border-left-color: var(--tda-dim); opacity: .9; }
.tda-rec b { display: block; font-size: 15.5px; margin-bottom: 5px; }
.tda-rec p { margin: 0; font-size: 14px; color: var(--tda-dim); }
.tda-price {
  display: inline-block; margin-top: 9px; font-size: 12px; color: var(--tda-accent);
  border: 1px solid rgba(45,212,191,.3); border-radius: 999px;
  padding: 2px 10px; background: rgba(45,212,191,.07);
}
.tda-second .tda-price { color: var(--tda-dim); border-color: var(--tda-line); background: transparent; }
.tda-assume { font-size: 12.5px; color: var(--tda-dim); margin: 10px 0 0; line-height: 1.55; }
.tda-cta {
  background: linear-gradient(135deg, rgba(45,212,191,.13), rgba(8,145,178,.07));
  border: 1px solid rgba(45,212,191,.3); border-radius: 12px;
  padding: 16px; margin-top: 18px;
}
.tda-cta b { display: block; margin-bottom: 5px; font-size: 15.5px; }
.tda-cta p { margin: 0 0 13px; font-size: 14px; color: var(--tda-dim); }
/* Steve's face; reuses /assets/steve.jpg, already shipped for /about/. */
.tda-who { display: flex; align-items: center; gap: 11px; margin-bottom: 5px; }
.tda-who img { border-radius: 50%; flex: none; object-fit: cover; }
.tda-who b { margin: 0; }
/* Quieter than the email row above it on purpose: optional must not read as a
   second thing to fill in before the button works. */
.tda-phone { display: block; margin: 11px 0 0; font-size: 13px; color: var(--tda-dim); }
.tda-phone input {
  display: block; width: 100%; margin-top: 6px; box-sizing: border-box;
  background: var(--tda-bg); border: 1px solid var(--tda-line); color: var(--tda-ink);
  border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 15px;
}
.tda-phone input:focus { outline: none; border-color: var(--tda-accent); }
.tda-err { color: var(--tda-hot); font-size: 13px; margin: 8px 0 0; }
.tda a { color: var(--tda-accent); }

/* ---------- bubble mode ---------- */
.tda-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 9998;
  display: flex; align-items: center; gap: 9px;
  background: var(--tda-accent); color: var(--tda-accent-ink);
  border: 0; border-radius: 999px; padding: 13px 20px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .16s, background .16s;
}
.tda-launcher:hover, .tda-launcher:focus-visible { transform: translateY(-2px); background: #5eead4; outline: none; }
.tda-launcher[hidden] { display: none; }

.tda-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  width: min(420px, calc(100vw - 36px));
  max-height: min(660px, calc(100dvh - 36px));
}
.tda-float .tda-panel { max-height: inherit; }
@media (max-width: 520px) {
  .tda-float {
    right: 0; bottom: 0; width: 100vw;
    max-height: 100dvh; height: 100dvh;
  }
  .tda-float .tda-panel { border-radius: 0; height: 100%; }
  .tda-stats { grid-template-columns: 1fr 1fr; }
  .tda-stat:first-child { grid-column: 1 / -1; }
  .tda-msg { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .tda *, .tda-launcher { animation: none !important; transition: none !important; }
}
