/* ============================================================
   NEXARA GUIDED TOUR v5.1 STYLES
   ============================================================ */

#nx-tour-root {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  z-index: 9999;
}
#nx-tour-root.visible { opacity: 1; pointer-events: auto; }

.nx-tour-overlay {
  position: absolute; inset: 0;
  pointer-events: auto;
}

#nx-tour-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
#nx-tour-cutout, #nx-tour-ring {
  transition: x 700ms cubic-bezier(0.22, 1, 0.36, 1),
              y 700ms cubic-bezier(0.22, 1, 0.36, 1),
              width 700ms cubic-bezier(0.22, 1, 0.36, 1),
              height 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
#nx-tour-ring { animation: nx-tour-ring-pulse 2.4s ease-in-out infinite; }
@keyframes nx-tour-ring-pulse {
  0%, 100% { stroke-opacity: 0.95; stroke-width: 2; }
  50%      { stroke-opacity: 0.55; stroke-width: 3; }
}

/* Cursor */
.nx-tour-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  pointer-events: none;
  z-index: 10001;
  opacity: 0;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
  filter: drop-shadow(0 4px 10px rgba(10, 132, 255, 0.45));
}
.nx-tour-cursor svg { display: block; }

/* Floating skip in top-right */
.nx-tour-skip-floating {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 10002;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(2, 8, 20, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.nx-tour-skip-floating:hover {
  background: rgba(2, 8, 20, 0.95);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}
.nx-tour-skip-floating svg { color: rgba(255, 255, 255, 0.7); }

/* Step card */
.nx-tour-card {
  position: fixed;
  top: 50%; left: 50%;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #0f1623;
  color: #f3f6fb;
  border: 1px solid rgba(10, 132, 255, 0.35);
  border-radius: 18px;
  padding: 0;
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 28px rgba(10, 132, 255, 0.25);
  z-index: 10003;
  pointer-events: auto;
  font-family: inherit;
  overflow: hidden;
  transition: top 480ms cubic-bezier(0.22, 1, 0.36, 1),
              left 480ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: nx-tour-card-in 320ms ease both;
}
@keyframes nx-tour-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.nx-tour-card.pos-center {
  width: 460px;
  text-align: center;
}

[data-theme="light"] .nx-tour-card {
  background: #ffffff;
  color: #0f1623;
  border-color: rgba(10, 132, 255, 0.4);
  box-shadow:
    0 24px 60px -16px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 0 24px rgba(10, 132, 255, 0.15);
}

.nx-tour-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}
[data-theme="light"] .nx-tour-progress { background: rgba(15, 23, 42, 0.08); }
.nx-tour-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0a84ff, #5e9bff);
  border-radius: 0 999px 999px 0;
  transition: width 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nx-tour-card-head {
  padding: 18px 22px 0;
}
.nx-tour-step-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5e9bff;
  background: rgba(10, 132, 255, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.nx-tour-title {
  font-size: 19px;
  font-weight: 700;
  margin: 12px 22px 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.nx-tour-card.pos-center .nx-tour-title { font-size: 22px; }

.nx-tour-body {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(243, 246, 251, 0.78);
  margin: 0 22px 18px;
}
[data-theme="light"] .nx-tour-body { color: rgba(15, 23, 42, 0.7); }

.nx-tour-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .nx-tour-actions {
  background: rgba(15, 23, 42, 0.025);
  border-top-color: rgba(15, 23, 42, 0.08);
}
.nx-tour-actions-right { display: inline-flex; gap: 8px; }

.nx-tour-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.nx-tour-skip {
  background: transparent;
  color: rgba(243, 246, 251, 0.55);
  border-color: transparent;
}
.nx-tour-skip:hover { color: rgba(243, 246, 251, 0.85); background: rgba(255,255,255,0.04); }
[data-theme="light"] .nx-tour-skip { color: rgba(15, 23, 42, 0.55); }
[data-theme="light"] .nx-tour-skip:hover { color: rgba(15, 23, 42, 0.85); background: rgba(15,23,42,0.04); }

.nx-tour-prev {
  background: transparent;
  color: rgba(243, 246, 251, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}
.nx-tour-prev:hover:not(:disabled) { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.32); }
.nx-tour-prev:disabled { opacity: 0.3; cursor: not-allowed; }
[data-theme="light"] .nx-tour-prev {
  color: rgba(15, 23, 42, 0.85);
  border-color: rgba(15, 23, 42, 0.18);
}
[data-theme="light"] .nx-tour-prev:hover:not(:disabled) { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.3); }

.nx-tour-next {
  background: linear-gradient(135deg, #0a84ff, #2a94ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}
.nx-tour-next:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(10, 132, 255, 0.45); }
.nx-tour-next:active { transform: translateY(0); }

/* Tail / arrow on card pointing to target */
.nx-tour-card::before {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  background: inherit;
  border: 1px solid rgba(10, 132, 255, 0.35);
  transform: rotate(45deg);
  opacity: 0;
  pointer-events: none;
}
[data-theme="light"] .nx-tour-card::before { border-color: rgba(10, 132, 255, 0.4); background: #fff; }
.nx-tour-card.pos-top::before    { opacity: 1; left: 50%; bottom: -7px; transform: translateX(-50%) rotate(45deg); border-top: none; border-left: none; }
.nx-tour-card.pos-bottom::before { opacity: 1; left: 50%; top: -7px;    transform: translateX(-50%) rotate(45deg); border-bottom: none; border-right: none; }
.nx-tour-card.pos-left::before   { opacity: 1; top: 50%; right: -7px;   transform: translateY(-50%) rotate(45deg); border-bottom: none; border-left: none; }
.nx-tour-card.pos-right::before  { opacity: 1; top: 50%; left: -7px;    transform: translateY(-50%) rotate(45deg); border-top: none; border-right: none; }

/* Body lock during tour - no scroll surprise */
body.nx-tour-active { overflow: hidden; }

/* Mobile */
@media (max-width: 640px) {
  .nx-tour-card { width: calc(100vw - 28px); }
  .nx-tour-card.pos-center { width: calc(100vw - 28px); }
  .nx-tour-skip-floating { top: 12px; right: 12px; padding: 6px 12px; font-size: 12px; }
}

/* ===== Header Restart Tour button ===== */
.btn-restart-tour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(10,132,255,0.45);
  background: rgba(10,132,255,0.10);
  color: #4ea3ff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}
.btn-restart-tour svg { flex: 0 0 auto; }
.btn-restart-tour:hover {
  background: rgba(10,132,255,0.18);
  border-color: rgba(10,132,255,0.75);
  color: #7ab8ff;
  box-shadow: 0 4px 14px rgba(10,132,255,0.25);
  transform: translateY(-1px);
}
.btn-restart-tour:active { transform: translateY(0); }

[data-theme="light"] .btn-restart-tour {
  border-color: rgba(10,132,255,0.50);
  background: rgba(10,132,255,0.08);
  color: #0a64c4;
}
[data-theme="light"] .btn-restart-tour:hover {
  background: rgba(10,132,255,0.16);
  color: #0a4ea0;
}

@media (max-width: 860px) {
  .btn-restart-tour span { display: none; }
  .btn-restart-tour { padding: 0 9px; }
}
