/* ==========================================
   MATRIX HUD - ONBOARDING TOUR STYLES
   ========================================== */

/* Overlay Container (No background dimming) */
.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99990;
  background: transparent;
  pointer-events: auto;
}

/* Element Spotlight Highlight (Clean Glow Frame) */
.tour-spotlight {
  position: fixed;
  z-index: 99995;
  pointer-events: none;
  border-radius: 10px;
  border: 2.5px solid #00f5ff;
  /* box-shadow: 
    0 0 25px rgba(0, 245, 255, 0.85),
    inset 0 0 15px rgba(0, 245, 255, 0.35); */
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.tour-spotlight::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 12px;
  border: 1.5px dashed rgba(0, 245, 255, 0.6);
  animation: tourPulse 2s infinite linear;
}

/* Popover Tooltip Box (Dark Mode Default) */
.tour-popover {
  position: fixed;
  z-index: 99999;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #0b1326;
  border: 1.5px solid #00f5ff;
  border-radius: 12px;
  padding: 20px;
  color: #ffffff;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(0, 245, 255, 0.3);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.35s cubic-bezier(0.25, 1, 0.5, 1), left 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.tour-popover.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Popover Arrow */
.tour-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #0b1326;
  border: 1.5px solid #00f5ff;
  transform: rotate(45deg);
  pointer-events: none;
}

.tour-popover[data-position="top"] .tour-arrow {
  bottom: -7px;
  border-top: none;
  border-left: none;
}

.tour-popover[data-position="bottom"] .tour-arrow {
  top: -7px;
  border-bottom: none;
  border-right: none;
}

.tour-popover[data-position="left"] .tour-arrow {
  right: -7px;
  border-bottom: none;
  border-left: none;
}

.tour-popover[data-position="right"] .tour-arrow {
  left: -7px;
  border-top: none;
  border-right: none;
}

/* Popover Content Structure */
.tour-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tour-popover-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-popover-title i {
  color: #00f5ff;
  font-size: 16px;
}

.tour-step-badge {
  background: rgba(0, 245, 255, 0.2);
  color: #00f5ff;
  border: 1px solid rgba(0, 245, 255, 0.4);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.tour-popover-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 18px;
  font-weight: 400;
}

.tour-popover-body b {
  color: #00f5ff;
}

.tour-popover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Action Buttons */
.tour-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tour-btn-skip {
  background: transparent;
  color: #94a3b8;
  padding: 8px 6px;
  font-weight: 600;
}

.tour-btn-skip:hover {
  color: #ef4444;
}

.tour-nav-group {
  display: flex;
  gap: 8px;
}

.tour-btn-prev {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
}

.tour-btn-prev:hover:not(:disabled) {
  background: #334155;
  color: #ffffff;
  border-color: #475569;
}

.tour-btn-prev:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* High Contrast Primary Next Button */
.tour-btn-next {
  background: #00f5ff !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.6) !important;
  border: 1px solid #00f5ff !important;
}

.tour-btn-next i {
  color: #000000 !important;
  font-weight: 900 !important;
}

.tour-btn-next:hover {
  background: #33f7ff !important;
  transform: translateY(-1px);
  /* box-shadow: 0 0 20px rgba(0, 245, 255, 0.8) !important; */
}

.tour-btn-finish {
  background: #10b981 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  /* box-shadow: 0 0 15px rgba(16, 185, 129, 0.6) !important; */
  border: 1px solid #10b981 !important;
}

.tour-btn-finish:hover {
  background: #34d399 !important;
  transform: translateY(-1px);
  /* box-shadow: 0 0 20px rgba(16, 185, 129, 0.8) !important; */
}

/* Header Help Button */
.btn-help {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: #00f5ff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.btn-help:hover {
  background: rgba(0, 245, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
  transform: scale(1.05);
}

/* Animations */
@keyframes tourPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.2;
  }

  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

/* ==========================================
   LIGHT MODE OVERRIDES
   ========================================== */
body[data-ui-mode="light"] .tour-spotlight {
  border-color: #5b6af0;
  box-shadow:
    0 0 20px rgba(91, 106, 240, 0.65),
    inset 0 0 12px rgba(91, 106, 240, 0.25);
}

body[data-ui-mode="light"] .tour-spotlight::after {
  border-color: rgba(91, 106, 240, 0.5);
}

body[data-ui-mode="light"] .tour-popover {
  background: #ffffff;
  border-color: #5b6af0;
  color: #1e2340;
  box-shadow:
    0 15px 35px rgba(30, 35, 64, 0.18),
    0 0 25px rgba(91, 106, 240, 0.2);
}

body[data-ui-mode="light"] .tour-arrow {
  background: #ffffff;
  border-color: #5b6af0;
}

body[data-ui-mode="light"] .tour-popover-title {
  color: #1e2340;
}

body[data-ui-mode="light"] .tour-popover-title i {
  color: #5b6af0;
}

body[data-ui-mode="light"] .tour-step-badge {
  background: rgba(91, 106, 240, 0.12);
  color: #5b6af0;
  border-color: rgba(91, 106, 240, 0.3);
}

body[data-ui-mode="light"] .tour-popover-body {
  color: #4b528a;
}

body[data-ui-mode="light"] .tour-popover-body b {
  color: #5b6af0;
}

body[data-ui-mode="light"] .tour-popover-footer {
  border-top-color: #e2e6ef;
}

body[data-ui-mode="light"] .tour-btn-skip {
  color: #6e7a9a;
}

body[data-ui-mode="light"] .tour-btn-skip:hover {
  color: #e0344b;
}

body[data-ui-mode="light"] .tour-btn-prev {
  background: #f7f8fc;
  color: #1e2340;
  border-color: #e2e6ef;
}

body[data-ui-mode="light"] .tour-btn-prev:hover:not(:disabled) {
  background: #eceef5;
  color: #5b6af0;
  border-color: #cbd5e1;
}

body[data-ui-mode="light"] .tour-btn-next {
  background: #5b6af0 !important;
  color: #ffffff !important;
  border-color: #5b6af0 !important;
  box-shadow: 0 4px 14px rgba(91, 106, 240, 0.35) !important;
}

body[data-ui-mode="light"] .tour-btn-next i {
  color: #ffffff !important;
}

body[data-ui-mode="light"] .tour-btn-next:hover {
  background: #4958e8 !important;
  box-shadow: 0 6px 18px rgba(91, 106, 240, 0.45) !important;
}

body[data-ui-mode="light"] .btn-help {
  background: rgba(91, 106, 240, 0.1);
  border-color: rgba(91, 106, 240, 0.3);
  color: #5b6af0;
}

body[data-ui-mode="light"] .btn-help:hover {
  background: rgba(91, 106, 240, 0.2);
  box-shadow: 0 0 12px rgba(91, 106, 240, 0.3);
}