/* package1.css
 * Package 1 additions: guided tour, header quick switcher, response swiping
 * and the live conversation token badge.
 *
 * All colours/shadow come from the existing token variables so every theme
 * (dark, light, cyberpunk, OLED…) keeps working.
 */

/* ================= HEADER QUICK SWITCHER ================= */
.quick-switcher { position: relative; display: inline-flex; }

.quick-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 15rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
}

.quick-switcher-btn:hover { background: rgba(255, 255, 255, 0.12); }

.quick-switcher-label {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-switcher-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.5rem);
  z-index: 60;
  width: min(19rem, 88vw);
  padding: 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 16, 26, 0.97);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(18px);
  text-align: start;
}

body[data-theme="light"] .quick-switcher-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.15);
}

.quick-switcher-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.quick-preset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.quick-preset {
  padding: 0.4rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
}

.quick-preset:hover { background: rgba(255, 255, 255, 0.14); }
.quick-preset[aria-pressed="true"] {
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.quick-switcher-note {
  margin: 0.6rem 0 0;
  font-size: 0.65rem;
  line-height: 1.45;
  color: #64748b;
}

/* ================= LIVE TOKEN BADGE ================= */
.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ================= RESPONSE SWIPING ================= */
.swipe-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0 0.15rem;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.swipe-nav button {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  line-height: 1;
}

.swipe-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.swipe-nav button:disabled { opacity: 0.3; cursor: not-allowed; }

.swipe-nav .swipe-index {
  min-width: 2.4rem;
  text-align: center;
  font-weight: 600;
}

/* ================= GUIDED TOUR ================= */
.tour-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

/* The dark veil is the spotlight's own box-shadow, so the target stays
   visually intact and nothing in the page needs restructuring. */
.tour-spotlight {
  position: fixed;
  border-radius: 0.9rem;
  box-shadow: 0 0 0 9999px rgba(3, 5, 12, 0.78);
  outline: 2px solid rgba(129, 140, 248, 0.85);
  outline-offset: 3px;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
}

.tour-card {
  position: fixed;
  width: min(22rem, 88vw);
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1.1rem;
  z-index: 9001;
  pointer-events: auto;
  color: #e2e8f0;
  text-align: start;
}

.tour-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tour-counter {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a5b4fc;
  font-variant-numeric: tabular-nums;
}

.tour-skip {
  padding: 0.25rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
}

.tour-skip:hover { background: rgba(255, 255, 255, 0.16); }

.tour-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.tour-body {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #cbd5e1;
}

.tour-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tour-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
}

.tour-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tour-btn-primary {
  border-color: rgba(129, 140, 248, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(236, 72, 153, 0.7));
  color: #fff;
}

/* RTL mirrors the navigation arrow order. */
[dir="rtl"] .tour-card-foot { flex-direction: row-reverse; }
[dir="rtl"] .quick-switcher-panel { text-align: right; }

/* Respect user motion preferences: no sliding spotlight. */
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight { transition: none; }
}

@media (max-width: 640px) {
  .quick-switcher-label { display: none; }
  .quick-switcher-btn { padding: 0.4rem; }
}
