/* ============================================================
   Signature Assistant — chat widget
   ============================================================ */
.assist-launch {
  position: fixed; right: 24px; bottom: 24px; z-index: 120;
  width: 62px; height: 62px; border-radius: 50%; border: none;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 34px rgba(13,24,64,.34); transition: transform .2s ease, background .2s ease;
}
.assist-launch:hover { background: var(--navy-700); transform: translateY(-2px) scale(1.04); }
.assist-launch.hide { display: none; }
.assist-badge {
  position: absolute; top: -4px; right: -4px; background: var(--green); color: var(--navy);
  font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: var(--r-pill);
  border: 2px solid #fff;
}
.assist-launch.pulse::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--green); animation: ping 1.8s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }

.assist-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 130;
  width: 392px; max-width: calc(100vw - 32px); height: 620px; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(13,24,64,.34);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
}
.assist-panel[hidden] { display: none !important; }

.assist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 18px; background: linear-gradient(120deg, var(--navy), var(--navy-700)); color: #fff; }
.assist-id { display: flex; align-items: center; gap: 12px; }
.assist-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--green); display: grid; place-items: center; flex: none; }
.assist-id strong { display: block; font-size: 15.5px; }
.assist-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b9c7e6; }
.assist-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(168,207,69,.28); }
.assist-head-btns { display: flex; gap: 4px; }
.assist-head-btns button { width: 34px; height: 34px; border-radius: 9px; border: none; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; transition: background .15s ease; }
.assist-head-btns button:hover, .assist-head-btns button.on { background: rgba(255,255,255,.2); }

.assist-body { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-soft); }
.bubble { display: flex; gap: 8px; max-width: 86%; }
.bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--green); display: grid; place-items: center; flex: none; margin-top: 2px; }
.bubble-text { padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.bubble.assistant .bubble-text { background: #fff; color: var(--ink); border: 1px solid var(--line); border-top-left-radius: 4px; }
.bubble.user .bubble-text { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.typing { display: flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b6c0d6; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.assist-quicks { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 0; background: #fff; scrollbar-width: none; }
.assist-quicks::-webkit-scrollbar { display: none; }
.assist-quicks button { white-space: nowrap; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--navy-600); background: #eef2fa; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; transition: .15s ease; }
.assist-quicks button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.assist-quicks button:disabled { opacity: .5; }

.assist-input { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; background: #fff; }
.assist-input input { flex: 1; font-family: inherit; font-size: 14.5px; padding: 13px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); outline: none; transition: border-color .15s ease; }
.assist-input input:focus { border-color: var(--navy-600); }
.assist-input button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--green); color: var(--navy); display: grid; place-items: center; flex: none; transition: .15s ease; }
.assist-input button:hover:not(:disabled) { background: var(--green-600); }
.assist-input button:disabled { opacity: .4; }

/* sub views (booking + settings) */
.assist-sub { flex: 1; overflow-y: auto; padding: 18px 18px 22px; background: var(--bg-soft); }
.sub-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--navy-600); padding: 4px 0; margin-bottom: 14px; }
.sub-head { display: flex; align-items: center; gap: 9px; color: var(--ink); margin-bottom: 6px; }
.sub-head svg { color: var(--navy-600); }
.sub-head strong { font-size: 17px; }
.sub-note { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }

.slots { display: flex; flex-direction: column; gap: 14px; }
.slot-day { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.slot-date { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.slot-times { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn { font-family: inherit; font-size: 14px; font-weight: 700; color: var(--navy-600); background: #eef2fa; border: 1.5px solid transparent; border-radius: 9px; padding: 9px 14px; transition: .15s ease; }
.slot-btn:hover { background: var(--navy); color: #fff; }

.book-form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.book-form label { display: flex; flex-direction: column; gap: 6px; }
.book-form label span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.book-form input, .book-form select { font-family: inherit; font-size: 14.5px; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); outline: none; background: #fff; appearance: none; }
.book-form input:focus, .book-form select:focus { border-color: var(--navy-600); }
.book-form .select-wrap svg { color: var(--muted); }
.book-err { font-size: 12.5px; color: #d64545; font-weight: 600; }
.book-form .btn { margin-top: 4px; }

.settings .set-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.settings .set-field span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.settings .set-field code { background: #e6ebf5; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.settings textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.5; padding: 12px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); outline: none; resize: vertical; color: var(--ink); background: #fff; }
.settings textarea:focus { border-color: var(--navy-600); }
.set-actions { display: flex; gap: 10px; justify-content: flex-end; }
.set-actions .btn { padding: 11px 20px; font-size: 14px; }

@media (max-width: 520px) {
  .assist-panel { right: 8px; bottom: 8px; height: calc(100vh - 16px); max-height: none; }
  .assist-launch { right: 16px; bottom: 16px; }
}
