/* AISupportChat.pro — inline AI support chat widget */

.ascw {
  --brand: #2457e6;
  --header-bg: var(--brand);
  --ink: #0f172a;
  --line: #e2e8f0;
  --muted: #64748b;
  --bg: #f8fafc;
  /* Theme-aware surfaces (overridden below for dark mode) */
  --panel-bg: #ffffff;
  --bubble-ai-bg: #ffffff;
  --bubble-ai-ink: #334155;
  --form-bg: #ffffff;
  --foot-bg: #ffffff;
  --avatar-ai-bg: #e8efff;
  --input-bg: #f8fafc;
  position: fixed;
  bottom: 88px; /* raised so it clears a typical bottom-right "back to top" button */
  z-index: 2147483000;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.ascw-left  { left: 20px; }
.ascw-right { right: 20px; }

/* ---------- Launcher ---------- */
.ascw-launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 20px 0 14px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(15, 23, 42, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ascw-launcher:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(15, 23, 42, .4); }
.ascw-launcher-icon { display: inline-flex; }
.ascw-launcher svg { width: 20px; height: 20px; }
.ascw-icon-close { display: none; }

.ascw-open .ascw-icon-chat { display: none; }
.ascw-open .ascw-icon-close { display: block; }

/* ---------- Greeting callout (floating bubble above the launcher) ---------- */
.ascw-callout {
  display: none;
  flex-direction: column;
  max-width: 300px;
  margin-bottom: 12px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: 0 18px 44px -16px rgba(15, 23, 42, .32);
  position: relative;
}
.ascw-callout.ascw-callout-show { display: flex; animation: ascw-callout-in .3s ease-out; }
.ascw-open .ascw-callout { display: none; }
.ascw-callout::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 30px;
  width: 13px;
  height: 13px;
  background: var(--panel-bg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.ascw-left .ascw-callout::after { right: auto; left: 30px; }
.ascw-callout-head { display: flex; align-items: flex-start; gap: 9px; }
.ascw-callout-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
}
.ascw-callout-avatar svg { width: 15px; height: 15px; }
.ascw-callout-text {
  flex: 1;
  min-width: 0;
  margin: 1px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.ascw-callout-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  margin: -3px -3px 0 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  transition: background .15s ease, color .15s ease;
}
.ascw-callout-close:hover { background: rgba(100, 116, 139, .14); color: var(--ink); }
.ascw-callout-close svg { width: 14px; height: 14px; }
.ascw-callout-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 10px; }
.ascw-callout-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 1.5px solid var(--brand);
  border-radius: 12px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.ascw-callout-btn:hover { background: var(--brand); color: #fff; transform: translateY(-1px); }
.ascw-callout-btn:active { transform: translateY(0); }
@keyframes ascw-callout-in {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Panel ---------- */
.ascw-panel {
  display: none;
  flex-direction: column;
  width: min(370px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 200px));
  margin-bottom: 12px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(15, 23, 42, .35);
  overflow: hidden;
}
.ascw-open .ascw-panel { display: flex; }

/* ---------- Header ---------- */
.ascw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  color: #fff;
  background: var(--header-bg);
}
.ascw-head-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.ascw-head-logo svg { width: 17px; height: 17px; }
.ascw-head-logo img { width: 100%; height: 100%; object-fit: cover; }
.ascw-head-text { min-width: 0; }
.ascw-head-text strong { display: block; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ascw-head-text span { display: block; font-size: 10px; color: rgba(255, 255, 255, .78); }
.ascw-close {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ascw-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.ascw-close svg { width: 15px; height: 15px; }

/* ---------- Body / messages ---------- */
.ascw-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.ascw-msg { display: flex; align-items: flex-start; gap: 8px; }
.ascw-user { flex-direction: row-reverse; }
.ascw-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
}
.ascw-avatar svg { width: 14px; height: 14px; }
.ascw-avatar-ai  { background: var(--avatar-ai-bg); color: var(--brand); }
.ascw-avatar-user { background: #0f172a; color: #fff; }
.ascw-bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.ascw-bubble-ai   { background: var(--bubble-ai-bg); border: 1px solid var(--line); color: var(--bubble-ai-ink); border-top-left-radius: 4px; }
.ascw-bubble-user { background: #0f172a; color: #fff; border-top-right-radius: 4px; }

.ascw-thinking { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ascw-thinking-text { display: inline-flex; align-items: center; gap: 4px; }
.ascw-dots i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 1px;
  border-radius: 50%;
  background: var(--brand);
  animation: ascw-blink 1.2s infinite ease-in-out;
}
.ascw-dots i:nth-child(2) { animation-delay: .18s; }
.ascw-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes ascw-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* The hidden attribute must win over display:flex/block so the
   "Thinking…" and error rows only appear when actually active. */
.ascw-thinking[hidden],
.ascw-error[hidden],
.ascw-connect[hidden],
.ascw-connecting[hidden],
.ascw-ticket-form[hidden],
.ascw-ticket-done[hidden],
.ascw-ticket-known[hidden],
.ascw-ticket-fields[hidden],
.ascw-form[hidden],
.ascw-handoff[hidden] { display: none !important; }

.ascw-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- Input ---------- */
.ascw-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--form-bg);
}
.ascw-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ascw-form input::placeholder { color: var(--muted); }
.ascw-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 87, 230, .14); }
.ascw-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: opacity .15s ease;
}
.ascw-send:hover { opacity: .88; }
.ascw-send:disabled { opacity: .45; cursor: not-allowed; }
.ascw-send svg { width: 15px; height: 15px; }

/* ---------- Foot ---------- */
.ascw-foot { padding: 0 14px 13px; background: var(--foot-bg); border-top: 1px solid var(--line); }
.ascw-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-bg);
  color: var(--bubble-ai-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.ascw-handoff:hover { background: var(--bg); }
.ascw-handoff svg { width: 14px; height: 14px; }
.ascw-handoff-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.ascw-handoff-primary:hover { background: var(--brand); opacity: .9; }
.ascw-branding { margin: 10px 0 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 10px; color: var(--muted); }
.ascw-branding-link { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.ascw-branding-link:hover { color: var(--brand); text-decoration: underline; }


/* ---------- Suggested questions (pre-chat greeting quick replies) ---------- */
.ascw-suggested {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding: 2px 0 4px;
  animation: ascw-fadeInUp .35s ease-out;
}
.ascw-suggested-btn {
  display: inline-flex;
  align-items: center;
  max-width: 88%;
  padding: 9px 14px;
  border: 1.5px solid var(--brand);
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  background: var(--panel-bg);
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .08);
}
.ascw-suggested-btn:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -3px rgba(36, 87, 230, .35);
}
.ascw-suggested-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px -2px rgba(0, 0, 0, .12);
}
@keyframes ascw-fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Greeting bubble entrance animation ---------- */
.ascw-msg.ascw-ai:first-child {
  animation: ascw-fadeInUp .3s ease-out;
}

/* ---------- Post-chat rating ---------- */
.ascw-rating { padding: 0 2px; }
.ascw-rating-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bubble-ai-bg);
}
.ascw-rating-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.ascw-rating-title svg {
  width: 22px;
  height: 22px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 1px;
}
.ascw-rating-title strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--bubble-ai-ink);
}
.ascw-rating-title span {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.ascw-rating-stars {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.ascw-star {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--line);
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
  padding: 0 2px;
  line-height: 1;
}
.ascw-star:hover { transform: scale(1.15); }
.ascw-star-active, .ascw-star-hover { color: #f59e0b; }
.ascw-rating-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}
.ascw-rating-comment {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color .15s ease;
}
.ascw-rating-comment:focus { border-color: var(--brand); }
.ascw-rating-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.ascw-rating-skip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ascw-rating-skip:hover { background: var(--bg); }
.ascw-rating-submit {
  padding: 7px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease;
}
.ascw-rating-submit:hover { opacity: .88; }
.ascw-rating-submit:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Push notification popup ---------- */
.ascw-push-popup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 14px;
  border-top-right-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  animation: ascw-fadeInUp .3s ease-out;
  transition: opacity .2s ease;
}
.ascw-push-popup:hover { opacity: .92; }
.ascw-push-popup-sender {
  font-size: 11px;
  font-weight: 700;
  opacity: .82;
}
.ascw-push-popup-body {
  font-size: 13px;
}

/* ---------- Dark mode (matches the site's data-theme toggle) ---------- */
html[data-theme="dark"] .ascw {
  --ink: #e2e8f0;
  --line: #2b3a54;
  --muted: #94a3b8;
  --bg: #0b1220;
  --panel-bg: #0f172a;
  --bubble-ai-bg: #1e293b;
  --bubble-ai-ink: #e2e8f0;
  --form-bg: #0f172a;
  --foot-bg: #0f172a;
  --avatar-ai-bg: rgba(36, 87, 230, .22);
  --input-bg: #141f38;
}
html[data-theme="dark"] .ascw-bubble-user { background: var(--brand); }

/* ---------- Forced widget themes (Helpdesk settings -> Widget theme) ----------
   The ID selector outranks the host page's own data-theme rules, so a forced
   Light or Dark theme always wins, on any visitor site. 'auto' sets no
   data-theme override and keeps the host-page behavior above. */
#ascw-root[data-theme="dark"] {
  --ink: #e2e8f0;
  --line: #2b3a54;
  --muted: #94a3b8;
  --bg: #0b1220;
  --panel-bg: #0f172a;
  --bubble-ai-bg: #1e293b;
  --bubble-ai-ink: #e2e8f0;
  --form-bg: #0f172a;
  --foot-bg: #0f172a;
  --avatar-ai-bg: rgba(36, 87, 230, .22);
  --input-bg: #141f38;
}
#ascw-root[data-theme="dark"] .ascw-bubble-user { background: var(--brand); }
#ascw-root[data-theme="light"] {
  --ink: #0f172a;
  --line: #e2e8f0;
  --muted: #64748b;
  --bg: #f8fafc;
  --panel-bg: #ffffff;
  --bubble-ai-bg: #ffffff;
  --bubble-ai-ink: #334155;
  --form-bg: #ffffff;
  --foot-bg: #ffffff;
  --avatar-ai-bg: #e8efff;
  --input-bg: #f8fafc;
}

@media (max-width: 520px) {
  .ascw { bottom: 74px; }
  .ascw-left, .ascw-right { left: 14px; right: 14px; }
  .ascw-panel { width: calc(100vw - 28px); max-height: calc(100vh - 165px); margin-bottom: 10px; }
  .ascw-launcher { height: 50px; }
}

/* ---------- Standalone preview page (widget.php opened directly) ---------- */
body.ascw-standalone-mode {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}
.ascw-standalone {
  width: 100%;
  max-width: 460px;
  padding: 24px;
  box-sizing: border-box;
}
.ascw-standalone-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .5);
}
.ascw-standalone-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  margin-bottom: 14px;
  overflow: hidden;
}
.ascw-standalone-logo svg { width: 24px; height: 24px; }
.ascw-standalone-logo img { width: 100%; height: 100%; object-fit: cover; }
.ascw-standalone-title { display: block; font-size: 17px; font-weight: 800; color: #0f172a; }
.ascw-standalone-text { font-size: 13px; line-height: 1.6; color: #475569; margin: 8px 0 0; }

/* ---------- AI assistant off: connect-to-human flow ---------- */
.ascw-connect,
.ascw-ticket-form { display: block; }
.ascw-form-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bubble-ai-bg);
}
.ascw-form-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.ascw-form-title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--avatar-ai-bg);
  color: var(--brand);
}
.ascw-form-title-icon svg { width: 15px; height: 15px; }
.ascw-form-title-ok .ascw-form-title-icon { background: rgba(34, 197, 94, .16); color: #16a34a; }
.ascw-form-title-warn .ascw-form-title-icon { background: rgba(245, 158, 11, .16); color: #d97706; }
.ascw-form-title-text { min-width: 0; }
.ascw-form-title-text strong { display: block; font-size: 13px; font-weight: 800; color: var(--bubble-ai-ink); }
.ascw-form-title-text span { display: block; font-size: 11px; line-height: 1.45; color: var(--muted); }
.ascw-field { display: flex; flex-direction: column; gap: 5px; }
.ascw-field-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.ascw-field-wrap { position: relative; display: block; }
.ascw-field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color .15s ease;
}
.ascw-field-wrap-area .ascw-field-icon { top: 15px; transform: none; }
.ascw-field-wrap:focus-within .ascw-field-icon { color: var(--brand); }
.ascw-connect input,
.ascw-ticket-form input,
.ascw-ticket-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 10px 35px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ascw-ticket-form textarea { padding-top: 11px; resize: vertical; min-height: 64px; }
.ascw-connect input::placeholder,
.ascw-ticket-form input::placeholder,
.ascw-ticket-form textarea::placeholder { color: var(--muted); }
.ascw-connect input:focus,
.ascw-ticket-form input:focus,
.ascw-ticket-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 87, 230, .14); }
.ascw-connect-btn,
.ascw-ticket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  box-shadow: 0 10px 22px -8px rgba(36, 87, 230, .55);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.ascw-connect-btn:hover,
.ascw-ticket-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 14px 26px -9px rgba(36, 87, 230, .6); }
.ascw-connect-btn:active,
.ascw-ticket-btn:active { transform: translateY(0); }
.ascw-connect-btn:disabled,
.ascw-ticket-btn:disabled { opacity: .55; cursor: not-allowed; }
.ascw-connect-btn svg,
.ascw-ticket-btn svg { width: 14px; height: 14px; }
.ascw-field-note { margin: 0; text-align: center; font-size: 10.5px; line-height: 1.5; color: var(--muted); }

.ascw-connecting { display: flex; }
.ascw-connecting-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bubble-ai-bg);
}
.ascw-connecting-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--avatar-ai-bg);
  color: var(--brand);
  margin-bottom: 8px;
  animation: ascw-pulse 1.6s infinite ease-in-out;
}
.ascw-connecting-icon svg { width: 17px; height: 17px; }
@keyframes ascw-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(36, 87, 230, .28); } 55% { box-shadow: 0 0 0 8px rgba(36, 87, 230, 0); } }
.ascw-connecting-text { font-size: 13px; font-weight: 700; color: var(--bubble-ai-ink); display: inline-flex; align-items: center; }
.ascw-connect-dots { display: inline-flex; gap: 2px; margin-left: 7px; vertical-align: middle; }
.ascw-connect-dots i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
  opacity: 0;
  animation: ascw-count 2.4s infinite;
}
.ascw-connect-dots i:nth-child(1) { animation-delay: 0s; }
.ascw-connect-dots i:nth-child(2) { animation-delay: .8s; }
.ascw-connect-dots i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ascw-count { 0%, 18% { opacity: 0; } 28%, 62% { opacity: 1; } 72%, 100% { opacity: 0; } }

.ascw-ticket-known {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}
.ascw-ticket-known-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.ascw-ticket-known-text { min-width: 0; display: flex; flex-direction: column; }
.ascw-ticket-known-text strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--bubble-ai-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ascw-ticket-known-text span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ascw-ticket-done { padding: 0 2px; }
.ascw-ticket-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px -8px rgba(36, 87, 230, .55);
  transition: transform .15s ease, filter .15s ease;
}
.ascw-ticket-open:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ---- Mobile: icon-only launcher, trimmed callout ---- */
@media (max-width: 640px) {
  .ascw-launcher {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .ascw-launcher-label { display: none; }
  .ascw-callout {
    right: 16px !important;
    bottom: 72px !important;
    left: 16px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 16px !important;
  }
  .ascw-callout-head { gap: 8px; }
  .ascw-callout-text { font-size: 13px; }
  .ascw-callout-btn { font-size: 12px; padding: 7px 12px; }
}
