/* ============================================================
   QERIONN Smart Guide — visual restyle v1 (presentational only)
   Loaded AFTER site.css. Overrides existing .guide-* classes.
   No markup / ID / JS-hook changes — safe for all guide scripts.
   ============================================================ */

/* ---------- Launcher pill ---------- */
.guide-launcher {
  min-width: auto !important;
  padding: 13px 22px 13px 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(214, 178, 94, 0.55) !important;
  background:
    linear-gradient(135deg, rgba(214,178,94,.16), rgba(214,178,94,0) 55%),
    linear-gradient(160deg, #10233c, #081527) !important;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(214, 178, 94, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
}
.guide-launcher:hover {
  transform: translateY(-3px) !important;
  border-color: #d6b25e !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 26px rgba(214, 178, 94, 0.28) !important;
}
.guide-launcher:focus-visible {
  outline: 2px solid #d6b25e !important;
  outline-offset: 3px !important;
}
.guide-launcher-mark {
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px rgba(214, 178, 94, 0.45), 0 0 16px rgba(214, 178, 94, 0.3) !important;
}
.guide-launcher span strong {
  display: block !important;
  font-size: 0.86rem !important;
  letter-spacing: 0.02em !important;
  color: #f2ecdd !important;
}
.guide-launcher span small {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #d6b25e !important;
}
/* live dot before the subtitle */
.guide-launcher span small::before {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #3fb97e !important;
  box-shadow: 0 0 8px #3fb97e !important;
  animation: qg-pulse 2s infinite !important;
}
@keyframes qg-pulse { 50% { opacity: 0.35; } }

/* ---------- Panel shell ---------- */
.guide-panel {
  padding: 0 !important;
  border-radius: 22px !important;
  border: 1px solid rgba(214, 178, 94, 0.28) !important;
  background:
    radial-gradient(560px 300px at 85% -10%, rgba(214, 178, 94, 0.10), transparent 60%),
    linear-gradient(170deg, #0b1a2f 0%, #060f1d 100%) !important;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(214, 178, 94, 0.08) !important;
  overflow: hidden !important;
  overflow-y: auto !important;
}
/* gold hairline on top edge */
.guide-panel::before {
  content: "" !important;
  position: sticky !important;
  top: 0 !important;
  display: block !important;
  height: 3px !important;
  background: linear-gradient(90deg, transparent, #d6b25e 30%, #b8933f 70%, transparent) !important;
  z-index: 5 !important;
}

/* ---------- Panel header ---------- */
.guide-header,
.guide-chat-panel .guide-header {
  padding: 18px 20px 16px !important;
  border-bottom: 1px solid rgba(214, 178, 94, 0.16) !important;
  background: linear-gradient(180deg, rgba(214, 178, 94, 0.05), transparent) !important;
}
.guide-avatar {
  border-radius: 14px !important;
  box-shadow: 0 0 0 2px rgba(214, 178, 94, 0.4), 0 6px 18px rgba(0, 0, 0, 0.4) !important;
}
.guide-header .section-kicker {
  color: #d6b25e !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.22em !important;
}
.guide-header h2 {
  font-size: 1.06rem !important;
  letter-spacing: 0.01em !important;
  color: #f4f0e6 !important;
}
.guide-slogan { color: #93a4b9 !important; font-size: 0.74rem !important; }
.guide-online {
  color: #7f93aa !important;
  font-size: 0.66rem !important;
}
.guide-online span {
  background: #3fb97e !important;
  box-shadow: 0 0 8px #3fb97e !important;
  animation: qg-pulse 2s infinite !important;
}
.guide-icon-button,
.guide-close {
  border: 1px solid rgba(214, 178, 94, 0.3) !important;
  border-radius: 10px !important;
  background: rgba(214, 178, 94, 0.07) !important;
  color: #d6b25e !important;
  transition: background .18s ease, transform .18s ease !important;
}
.guide-icon-button:hover,
.guide-close:hover {
  background: rgba(214, 178, 94, 0.18) !important;
  transform: scale(1.06) !important;
}

/* ---------- Profile gate (name / email / phone form) ---------- */
.guide-profile-gate {
  padding: 18px 20px 22px !important;
}
.guide-profile-gate h3 { color: #f4f0e6 !important; font-size: 0.95rem !important; }
.guide-profile-gate > p { color: #8fa0b5 !important; font-size: 0.76rem !important; }
.guide-profile-field span {
  color: #d6b25e !important;
  font-size: 0.64rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}
.guide-profile-field input,
.guide-profile-form input,
.guide-profile-form select {
  border: 1px solid rgba(214, 178, 94, 0.22) !important;
  border-radius: 12px !important;
  background: rgba(6, 14, 26, 0.85) !important;
  color: #eef2f8 !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}
.guide-profile-field input:focus,
.guide-profile-form input:focus,
.guide-profile-form select:focus {
  border-color: #d6b25e !important;
  box-shadow: 0 0 0 3px rgba(214, 178, 94, 0.16) !important;
  outline: none !important;
}
.guide-profile-form button[type="submit"],
.guide-profile-form .guide-primary-action {
  border-radius: 999px !important;
  border: 0 !important;
  background: linear-gradient(135deg, #e2c374, #c9a24e) !important;
  color: #081527 !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 10px 26px rgba(214, 178, 94, 0.3) !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}
.guide-profile-form button[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 34px rgba(214, 178, 94, 0.42) !important;
}

/* ---------- Messages area ---------- */
.guide-messages {
  padding: 16px 18px !important;
  background:
    radial-gradient(420px 240px at 12% 0%, rgba(94, 155, 214, 0.05), transparent 55%),
    transparent !important;
}
.guide-message {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
}
.guide-message-row.is-system .guide-message {
  background: linear-gradient(160deg, #12253e, #0c1b30) !important;
  border-color: rgba(214, 178, 94, 0.14) !important;
  border-top-left-radius: 6px !important;
  color: #dbe4ef !important;
}
.guide-message-row.is-user .guide-message {
  background: linear-gradient(135deg, rgba(214, 178, 94, 0.92), rgba(184, 147, 63, 0.92)) !important;
  border-color: transparent !important;
  border-top-right-radius: 6px !important;
  color: #081527 !important;
  font-weight: 600 !important;
}
.guide-message small { opacity: 0.65 !important; font-size: 0.62rem !important; }

/* ---------- Composer / inputs at bottom ---------- */
.guide-panel textarea,
.guide-panel input[type="text"]:not(.guide-profile-field input),
.guide-composer textarea,
.guide-composer input {
  border: 1px solid rgba(214, 178, 94, 0.22) !important;
  border-radius: 14px !important;
  background: rgba(6, 14, 26, 0.9) !important;
  color: #eef2f8 !important;
}
.guide-panel textarea:focus,
.guide-composer textarea:focus,
.guide-composer input:focus {
  border-color: #d6b25e !important;
  box-shadow: 0 0 0 3px rgba(214, 178, 94, 0.15) !important;
  outline: none !important;
}

/* ---------- Scrollbar ---------- */
.guide-panel::-webkit-scrollbar,
.guide-messages::-webkit-scrollbar { width: 8px !important; }
.guide-panel::-webkit-scrollbar-thumb,
.guide-messages::-webkit-scrollbar-thumb {
  background: rgba(214, 178, 94, 0.3) !important;
  border-radius: 8px !important;
}
.guide-panel::-webkit-scrollbar-track,
.guide-messages::-webkit-scrollbar-track { background: transparent !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .guide-launcher, .guide-icon-button, .guide-close { transition: none !important; }
  .guide-launcher span small::before, .guide-online span { animation: none !important; }
}

/* ============================================================
   v2 — COMPACT "standard chatbot" layout
   Tight top bar (avatar + name + online), no sprawling header,
   condensed form. CSS-only; all JS hooks untouched.
   ============================================================ */

/* panel: classic messenger proportions */
.guide-panel {
  width: min(calc(100vw - 32px), 384px) !important;
  max-height: min(620px, calc(100vh - 44px)) !important;
  display: flex !important;
  flex-direction: column !important;
}
.guide-panel::before { flex-shrink: 0; }

/* ---- header: single compact bar ---- */
.guide-header,
.guide-chat-panel .guide-header {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 0 !important;
  padding: 12px 14px !important;
  margin: 0 !important;
}
.guide-identity {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  margin: 0 !important;
  min-width: 0 !important;
}
.guide-identity > div { display: flex !important; flex-direction: column !important; gap: 1px !important; min-width: 0 !important; }
.guide-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  flex-shrink: 0 !important;
}
/* kicker becomes the small over-title */
.guide-header .section-kicker {
  font-size: 0.52rem !important;
  letter-spacing: 0.2em !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.guide-header h2 {
  font-size: 0.95rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}
/* hide the sprawling copy — the bar speaks for itself */
.guide-slogan { display: none !important; }
.guide-online {
  margin: 1px 0 0 !important;
  font-size: 0.6rem !important;
  line-height: 1.3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.guide-online span { width: 6px !important; height: 6px !important; flex-shrink: 0 !important; }
/* shorten the long availability line visually */
.guide-online {
  max-width: 210px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.guide-header-actions { display: flex !important; gap: 6px !important; flex-shrink: 0 !important; margin: 0 !important; }
.guide-icon-button, .guide-close {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
}

/* ---- body: condensed form / messages ---- */
.guide-profile-gate {
  padding: 14px 16px 16px !important;
  overflow-y: auto !important;
}
.guide-profile-gate h3 {
  font-size: 0.86rem !important;
  margin: 0 0 4px !important;
}
.guide-profile-gate > p {
  font-size: 0.7rem !important;
  line-height: 1.45 !important;
  margin: 0 0 12px !important;
}
.guide-profile-form { display: flex !important; flex-direction: column !important; gap: 10px !important; }
.guide-profile-field { display: flex !important; flex-direction: column !important; gap: 4px !important; margin: 0 !important; }
.guide-profile-field span { font-size: 0.56rem !important; }
.guide-profile-field input,
.guide-profile-form input,
.guide-profile-form select {
  padding: 9px 12px !important;
  font-size: 0.82rem !important;
  border-radius: 10px !important;
}
.guide-profile-form button[type="submit"],
.guide-profile-form .guide-primary-action {
  padding: 11px 16px !important;
  font-size: 0.84rem !important;
  margin-top: 2px !important;
}
/* small print notes: quiet, tight */
.guide-profile-gate p:last-child,
.guide-profile-form + p,
.guide-panel .guide-footnote {
  font-size: 0.6rem !important;
  line-height: 1.45 !important;
  color: #6d8098 !important;
  margin-top: 10px !important;
}
.guide-messages { padding: 12px 14px !important; }
.guide-message { font-size: 0.8rem !important; }

@media (max-width: 480px) {
  .guide-panel { width: calc(100vw - 20px) !important; max-height: calc(100vh - 20px) !important; }
}
