/* Alex Smart Tech — AI intake widget (homepage hero "Start intake").
   Self-contained: all classes are astik- prefixed. Colors mirror the v6
   "light" skin, same as the sales chat: white panel, pastel header wash,
   ink text; the gradient stays on accents. */
.astik-root {
  --astik-bg: #ffffff; --astik-panel: #ffffff; --astik-panel2: #f5f7fc;
  --astik-line: #e2e7f3; --astik-txt: #0c1233; --astik-body: #2a3352;
  --astik-mut: #5b657f; --astik-cyan: #0284c7; --astik-blue: #2f7bff;
  --astik-violet: #7c3aed; --astik-mag: #ff2ec4;
  --astik-grad: linear-gradient(92deg,#1fc8ff 0%,#2f7bff 34%,#7c3aed 68%,#ff2ec4 100%);
  --astik-wash: linear-gradient(120deg,rgba(31,200,255,.16),rgba(124,58,237,.12),rgba(255,46,196,.13));
  font-family: "Inter", system-ui, sans-serif; color: var(--astik-txt);
  position: fixed; right: 18px; bottom: 18px; z-index: 99990;
  -webkit-font-smoothing: antialiased;
}
.astik-root *, .astik-root *::before, .astik-root *::after { box-sizing: border-box; }

#intakeOpen { font: inherit; cursor: pointer; }

.astik-panel {
  display: none; flex-direction: column; overflow: hidden;
  width: min(392px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 110px));
  background: #ffffff;
  border: 1px solid var(--astik-line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(12,18,51,.20), 0 2px 10px rgba(12,18,51,.08);
}
.astik-root.astik-open .astik-panel { display: flex; }
.astik-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--astik-line);
  background: var(--astik-wash);
}
.astik-head .astik-title { font: 700 15.5px "Libre Franklin","Inter",sans-serif; color: var(--astik-txt); line-height: 1.25; }
.astik-head .astik-sub { font-size: 12px; color: var(--astik-mut); margin-top: 2px; line-height: 1.4; }
.astik-close {
  margin-left: auto; flex: none; cursor: pointer; border: 1px solid var(--astik-line);
  background: #ffffff; color: var(--astik-txt);
  width: 32px; height: 32px; border-radius: 10px; font-size: 16px; line-height: 1;
}
.astik-close:hover { border-color: rgba(2,132,199,.5); }

/* consent gate */
.astik-terms { padding: 18px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; font-size: 14px; line-height: 1.55; color: var(--astik-body); }
.astik-terms h3 { margin: 0 0 10px; font: 700 16px "Libre Franklin","Inter",sans-serif; color: var(--astik-txt); }
.astik-terms ul { margin: 0 0 16px; padding-left: 19px; }
.astik-terms li { margin-bottom: 8px; }
.astik-accept {
  width: 100%; cursor: pointer; border: none; border-radius: 12px; padding: 13px 16px;
  background: var(--astik-grad); color: #04061c; font: 700 15px "Inter",system-ui,sans-serif;
}
.astik-accept:hover { filter: brightness(1.07); }

/* chat area */
.astik-chat { display: none; flex-direction: column; flex: 1; min-height: 0; }
.astik-root.astik-accepted .astik-chat { display: flex; }
.astik-root.astik-accepted .astik-terms { display: none; }
.astik-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; }
.astik-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.astik-msg.astik-ai { align-self: flex-start; background: var(--astik-panel2); border: 1px solid var(--astik-line); color: var(--astik-body); border-bottom-left-radius: 5px; }
.astik-msg.astik-user { align-self: flex-end; background: linear-gradient(120deg, rgba(31,200,255,.20), rgba(124,58,237,.20)); border: 1px solid rgba(2,132,199,.35); color: var(--astik-txt); border-bottom-right-radius: 5px; }
.astik-msg a { color: var(--astik-cyan); }
.astik-typing { align-self: flex-start; display: none; gap: 5px; padding: 12px 14px; background: var(--astik-panel2); border: 1px solid var(--astik-line); border-radius: 14px; border-bottom-left-radius: 5px; }
.astik-typing.astik-on { display: inline-flex; }
.astik-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--astik-cyan); opacity: .35; animation: astik-blink 1.1s infinite; }
.astik-typing i:nth-child(2) { animation-delay: .18s; } .astik-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes astik-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.astik-form { display: flex; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--astik-line); }
.astik-input {
  flex: 1; min-width: 0; border: 1px solid var(--astik-line); border-radius: 12px;
  background: #ffffff; color: var(--astik-txt);
  font: 400 16px "Inter",system-ui,sans-serif; padding: 11px 13px; resize: none;
}
.astik-input::placeholder { color: var(--astik-mut); }
.astik-input:focus { outline: none; border-color: rgba(2,132,199,.6); }
.astik-input:disabled { background: var(--astik-panel2); }
.astik-send {
  flex: none; cursor: pointer; border: none; border-radius: 12px; padding: 0 17px;
  background: var(--astik-grad); color: #04061c; font: 700 14.5px "Inter",system-ui,sans-serif;
}
.astik-send:disabled { opacity: .55; cursor: default; }
.astik-note { padding: 0 14px 10px; font-size: 11.5px; color: var(--astik-mut); line-height: 1.45; }
.astik-partial {
  display: none; margin: 0 14px 10px; padding: 0; background: none; border: none; cursor: pointer;
  font: 600 12.5px "Inter",system-ui,sans-serif; color: var(--astik-cyan); text-align: left; text-decoration: underline;
}
.astik-partial.astik-show { display: block; }

/* done view */
.astik-done { display: none; padding: 22px 18px; overflow-y: auto; text-align: left; }
.astik-root.astik-done-state .astik-done { display: block; }
.astik-root.astik-done-state .astik-chat, .astik-root.astik-done-state .astik-terms { display: none; }
.astik-done .astik-check {
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 12px;
  background: var(--astik-grad); color: #ffffff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
}
.astik-done h3 { margin: 0 0 8px; font: 700 17px "Libre Franklin","Inter",sans-serif; color: var(--astik-txt); }
.astik-done p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--astik-body); }
.astik-done .astik-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.astik-done .astik-actions a {
  flex: 1; text-align: center; text-decoration: none; border-radius: 12px; padding: 12px 10px;
  font: 700 14px "Inter",system-ui,sans-serif; white-space: nowrap;
}
.astik-done .astik-call { background: var(--astik-grad); color: #04061c; }
.astik-done .astik-text { border: 1px solid var(--astik-line); color: var(--astik-txt); background: #ffffff; }

@media (max-width: 560px) {
  .astik-root { right: 12px; bottom: 12px; }
  .astik-panel { width: calc(100vw - 24px); height: min(600px, calc(100dvh - 96px)); }
}
