/* ============================================================
   TTP Visitor Tour — visitor-tour.css
   The Token Playbook · v1.0 · March 2026

   Visual language matches advisor-modal.css exactly.
   ============================================================ */

/* ============================================================
   INTAKE MODAL OVERLAY
   ============================================================ */
#ttp-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 15, 26, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#ttp-tour-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

#ttp-tour-modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  background: #0f1923;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(26, 144, 184, 0.12),
    inset 0 1px 0 rgba(126, 202, 195, 0.07);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ttp-tour-overlay.is-open #ttp-tour-modal {
  transform: translateY(0) scale(1);
}

/* ============================================================
   INTAKE MODAL HEADER
   ============================================================ */
.tour-modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(26, 58, 92, 0.6);
  flex-shrink: 0;
}

.tour-modal-brand {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1A90B8;
  opacity: 0.7;
  margin-bottom: 14px;
}

.tour-modal-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.tour-modal-sub {
  font-size: 14px;
  color: #6A95B5;
  line-height: 1.5;
}

/* ============================================================
   INTAKE MODAL BODY (scrollable)
   ============================================================ */
.tour-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: #1A3A5C transparent;
}

.tour-modal-body::-webkit-scrollbar { width: 4px; }
.tour-modal-body::-webkit-scrollbar-track { background: transparent; }
.tour-modal-body::-webkit-scrollbar-thumb { background: #1A3A5C; border-radius: 4px; }

/* Step label */
.tour-step-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3A6A8A;
  margin-bottom: 20px;
}

/* Form fields */
.tour-field {
  margin-bottom: 16px;
}

.tour-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6A95B5;
  margin-bottom: 6px;
}

.tour-field input {
  width: 100%;
  background: #071a2b;
  border: 1px solid #1A3A5C;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: #E8F0F7;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.tour-field input::placeholder { color: #3A6A8A; }

.tour-field input:focus {
  border-color: #1A90B8;
  box-shadow: 0 0 0 3px rgba(26, 144, 184, 0.1);
}

/* ============================================================
   PERSONA / INTEREST CARDS (matches Advisor Q1 cards)
   ============================================================ */
.tour-question-text {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
}

.tour-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.tour-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(7, 26, 43, 0.6);
  border: 1px solid #1A3A5C;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s;
  width: 100%;
}

.tour-choice:hover {
  border-color: rgba(26, 144, 184, 0.5);
  background: rgba(26, 144, 184, 0.05);
}

.tour-choice.is-selected {
  border-color: #1A90B8;
  background: rgba(26, 144, 184, 0.1);
}

.tour-choice-radio {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid #1A3A5C;
  border-radius: 50%;
  margin-top: 2px;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
}

.tour-choice.is-selected .tour-choice-radio {
  border-color: #1A90B8;
  background: #1A90B8;
}

.tour-choice.is-selected .tour-choice-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: white;
  border-radius: 50%;
}

.tour-choice-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #E8F0F7;
  line-height: 1.3;
}

.tour-choice-hint {
  display: block;
  font-size: 12px;
  color: #6A95B5;
  margin-top: 2px;
}

/* ============================================================
   INTAKE MODAL FOOTER
   ============================================================ */
.tour-modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(26, 58, 92, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tour-btn-skip {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: #3A6A8A;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.18s;
  text-decoration: none;
}
.tour-btn-skip:hover { color: #6A95B5; }

.tour-btn-back {
  background: none;
  border: 1px solid #1A3A5C;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #6A95B5;
  cursor: pointer;
  padding: 9px 16px;
  transition: border-color 0.18s, color 0.18s;
}
.tour-btn-back:hover { border-color: #1A90B8; color: #1A90B8; }

.tour-btn-next {
  background: #1A90B8;
  border: none;
  border-radius: 6px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 22px;
  transition: background 0.18s;
}
.tour-btn-next:hover { background: #1578A0; }
.tour-btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   SPOTLIGHT OVERLAY (Tour Steps)
   ============================================================ */
.ttp-spotlight-target {
  position: relative !important;
  z-index: 10000 !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75) !important;
  border-radius: 8px !important;
  outline: 2px solid rgba(26, 144, 184, 0.6);
  outline-offset: 3px;
  transition: box-shadow 0.25s ease;
}

/* ============================================================
   TOUR TOOLTIP
   ============================================================ */
#ttp-tour-tooltip {
  position: fixed;
  z-index: 10001;
  width: 320px;
  background: #0f1923;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #1A90B8;
  border-radius: 10px;
  padding: 18px 20px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: all;
}

#ttp-tour-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tour-tooltip-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #3A6A8A;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tour-tooltip-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tour-tooltip-body {
  font-size: 13px;
  color: #c0c8d0;
  line-height: 1.55;
  margin-bottom: 14px;
}

.tour-tooltip-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-nav-back {
  background: none;
  border: 1px solid #1A3A5C;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  color: #6A95B5;
  cursor: pointer;
  padding: 6px 12px;
  transition: border-color 0.18s, color 0.18s;
}
.tour-nav-back:hover { border-color: #1A90B8; color: #1A90B8; }

.tour-nav-next {
  background: #1A90B8;
  border: none;
  border-radius: 5px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  padding: 7px 14px;
  transition: background 0.18s;
}
.tour-nav-next:hover { background: #1578A0; }

.tour-nav-skip {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11px;
  color: #3A6A8A;
  cursor: pointer;
  padding: 4px 0;
  margin-left: auto;
  transition: color 0.18s;
}
.tour-nav-skip:hover { color: #6A95B5; }

/* ============================================================
   TOUR TERMINUS OVERLAY
   ============================================================ */
#ttp-tour-terminus {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 15, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

#ttp-tour-terminus.is-open {
  opacity: 1;
  pointer-events: all;
}

.tour-terminus-card {
  background: #0f1923;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ttp-tour-terminus.is-open .tour-terminus-card {
  transform: translateY(0) scale(1);
}

.tour-terminus-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1A90B8;
  margin-bottom: 14px;
}

.tour-terminus-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.2;
}

.tour-terminus-body {
  font-size: 14px;
  color: #c0c8d0;
  line-height: 1.6;
  margin-bottom: 28px;
}

.tour-terminus-cta {
  background: #1A90B8;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 14px 28px;
  width: 100%;
  transition: background 0.18s;
  margin-bottom: 10px;
  display: block;
}
.tour-terminus-cta:hover { background: #1578A0; }

.tour-terminus-secondary {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: #3A6A8A;
  cursor: pointer;
  padding: 8px;
  display: block;
  width: 100%;
  transition: color 0.18s;
}
.tour-terminus-secondary:hover { color: #6A95B5; }

/* ============================================================
   DECLINE CARD (slide-up)
   ============================================================ */
#ttp-tour-decline {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10003;
  background: #0f1923;
  border-top: 1px solid rgba(26, 144, 184, 0.3);
  border-radius: 16px 16px 0 0;
  padding: 28px 28px 32px;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 640px;
  margin: 0 auto;
}

#ttp-tour-decline.is-open {
  transform: translateY(0);
}

.tour-decline-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.tour-decline-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.tour-decline-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid #1A3A5C;
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  color: #c0c8d0;
  transition: border-color 0.18s, background 0.18s;
  width: 100%;
}

.tour-decline-option:hover { border-color: rgba(26,144,184,0.4); background: rgba(26,144,184,0.04); }

.tour-decline-option.is-selected {
  border-color: #1A90B8;
  background: rgba(26, 144, 184, 0.08);
  color: #E8F0F7;
}

.tour-decline-textarea {
  width: 100%;
  background: #071a2b;
  border: 1px solid #1A3A5C;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: #E8F0F7;
  resize: vertical;
  min-height: 64px;
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.tour-decline-textarea::placeholder { color: #3A6A8A; }
.tour-decline-textarea:focus { border-color: #1A90B8; }

.tour-decline-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tour-decline-submit {
  background: #1A90B8;
  border: none;
  border-radius: 6px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  padding: 9px 20px;
  transition: background 0.18s;
}
.tour-decline-submit:hover { background: #1578A0; }

.tour-decline-dismiss {
  background: none;
  border: 1px solid #1A3A5C;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #6A95B5;
  cursor: pointer;
  padding: 9px 16px;
  transition: border-color 0.18s;
}
.tour-decline-dismiss:hover { border-color: #1A90B8; }

.tour-decline-confirm {
  font-size: 13px;
  color: #7ECAC3;
  text-align: center;
  padding: 8px;
  display: none;
}

/* Decline backdrop */
#ttp-tour-decline-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#ttp-tour-decline-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 600px) {
  #ttp-tour-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
  }

  #ttp-tour-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #ttp-tour-tooltip {
    width: calc(100vw - 24px);
    left: 12px !important;
    right: 12px !important;
  }

  .tour-terminus-card {
    padding: 28px 20px;
  }

  #ttp-tour-decline {
    max-width: 100%;
    left: 0;
    right: 0;
  }
}
