/* ==========================================================================
   KYNOX IMMERSIVE & MINIMALIST ONBOARDING (Driver.js + Curved SVG Arrows)
   Designed with SOLID component separation:
   - Spotlight & Stage styling (.driver-active, .driver-overlay)
   - Minimalist Glass Popover (.kynox-driver-popover)
   - Curved SVG Arrow Layer (#kynoxCurvedArrowSvg)
   - Tour Hub Launcher Modal (#kynoxTourHubBack) & Header Trigger Pills
   ========================================================================== */

@import url('/vendor/driver/driver.css');

:root {
  --kx-tour-bg: rgba(18, 19, 24, 0.94);
  --kx-tour-border: rgba(255, 255, 255, 0.12);
  --kx-tour-accent: #c6ff33;
  --kx-tour-accent-soft: rgba(198, 255, 51, 0.14);
  --kx-tour-text: #f5f6f8;
  --kx-tour-muted: rgba(235, 238, 245, 0.68);
  --kx-tour-shadow: 0 22px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- 1. Driver.js Minimalist Popover Override ---------- */
.driver-popover.kynox-driver-popover {
  background: var(--kx-tour-bg) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  color: var(--kx-tour-text) !important;
  border: 1px solid var(--kx-tour-border) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  max-width: 340px !important;
  min-width: 276px !important;
  box-shadow: var(--kx-tour-shadow) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif !important;
  animation: kxPopoverIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kxPopoverIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hide default triangle arrow because we draw a sleek Curved SVG Bézier Arrow */
.driver-popover.kynox-driver-popover .driver-popover-arrow {
  display: none !important;
}

.driver-popover.kynox-driver-popover .kx-pop-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-right: 32px;
}

.driver-popover.kynox-driver-popover .kx-pop-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kx-tour-accent);
  background: var(--kx-tour-accent-soft);
  border: 1px solid rgba(198, 255, 51, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
}

.driver-popover.kynox-driver-popover .kx-pop-step-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.driver-popover.kynox-driver-popover .kx-pop-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.driver-popover.kynox-driver-popover .kx-pop-dot.active {
  width: 16px;
  background: var(--kx-tour-accent);
}

.driver-popover.kynox-driver-popover .kx-pop-dot.done {
  background: rgba(198, 255, 51, 0.55);
}

.driver-popover.kynox-driver-popover .driver-popover-title {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  padding-right: 18px !important;
  letter-spacing: -0.01em !important;
}

.driver-popover.kynox-driver-popover .driver-popover-description {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--kx-tour-muted) !important;
  margin: 0 !important;
}

.driver-popover.kynox-driver-popover .driver-popover-description b {
  color: #ffffff;
  font-weight: 500;
}

.driver-popover.kynox-driver-popover .kx-pop-tip {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--kx-tour-accent);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
}

.driver-popover.kynox-driver-popover .driver-popover-footer {
  margin-top: 14px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.driver-popover.kynox-driver-popover .driver-popover-progress-text {
  font-size: 11px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.48) !important;
}

.driver-popover.kynox-driver-popover .driver-popover-navigation-btns {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.driver-popover.kynox-driver-popover .driver-popover-prev-btn,
.driver-popover.kynox-driver-popover .driver-popover-next-btn {
  text-shadow: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  padding: 6px 13px !important;
  transition: all 0.16s ease !important;
  cursor: pointer !important;
}

.driver-popover.kynox-driver-popover .driver-popover-prev-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.driver-popover.kynox-driver-popover .driver-popover-prev-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.driver-popover.kynox-driver-popover .driver-popover-next-btn {
  background: var(--kx-tour-accent) !important;
  color: #0b0c0e !important;
  border: 1px solid var(--kx-tour-accent) !important;
}

.driver-popover.kynox-driver-popover .driver-popover-next-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.driver-popover.kynox-driver-popover .driver-popover-close-btn {
  top: 12px !important;
  right: 12px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  color: rgba(255, 255, 255, 0.52) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
}

.driver-popover.kynox-driver-popover .driver-popover-close-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

/* ---------- 2. Curved SVG Bézier Arrow Overlay ---------- */
#kynoxCurvedArrowSvg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000000001;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.18s ease;
}

#kynoxCurvedArrowSvg.visible {
  opacity: 1;
}

.kx-arrow-glow {
  fill: none;
  stroke: rgba(198, 255, 51, 0.26);
  stroke-width: 6px;
  stroke-linecap: round;
  filter: blur(3px);
}

.kx-arrow-path {
  fill: none;
  stroke: var(--kx-tour-accent);
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-dasharray: 6 4;
  animation: kxArrowDashFlow 1.2s linear infinite;
}

@keyframes kxArrowDashFlow {
  to {
    stroke-dashoffset: -20;
  }
}

.kx-arrow-origin-dot {
  fill: var(--kx-tour-accent);
}

.kx-arrow-target-ring {
  fill: none;
  stroke: var(--kx-tour-accent);
  stroke-width: 1.8px;
  transform-origin: center;
  animation: kxTargetPulse 1.6s ease-out infinite;
}

@keyframes kxTargetPulse {
  0% {
    r: 5px;
    opacity: 0.95;
  }
  100% {
    r: 16px;
    opacity: 0;
  }
}

/* ---------- 3. Trigger Pills in Headers ---------- */
.kx-tour-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1;
  color: inherit;
  background: rgba(120, 120, 128, 0.12);
  border: 1px solid rgba(120, 120, 128, 0.22);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.kx-tour-trigger-btn:hover {
  background: rgba(198, 255, 51, 0.16);
  border-color: rgba(198, 255, 51, 0.45);
}

.kx-tour-trigger-btn .kx-tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c6ff33;
  box-shadow: 0 0 8px rgba(198, 255, 51, 0.8);
}

/* ---------- 4. Minimalist Tour Hub Modal ---------- */
.kx-hub-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.kx-hub-backdrop.open {
  display: flex;
}

.kx-hub-card {
  width: 100%;
  max-width: 580px;
  background: #121318;
  color: #f5f6f8;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  max-height: 88vh;
  overflow-y: auto;
}

.kx-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.kx-hub-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.kx-hub-head p {
  margin: 4px 0 0 0;
  font-size: 12px;
  font-weight: 400;
  color: rgba(235, 238, 245, 0.62);
}

.kx-hub-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.kx-hub-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.kx-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.kx-hub-item {
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 14px;
  color: #f5f6f8;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kx-hub-item:hover {
  background: rgba(198, 255, 51, 0.07);
  border-color: rgba(198, 255, 51, 0.38);
  transform: translateY(-1px);
}

.kx-hub-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kx-hub-item-tag {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c6ff33;
  background: rgba(198, 255, 51, 0.12);
  padding: 2px 7px;
  border-radius: 999px;
}

.kx-hub-item-meta {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.46);
}

.kx-hub-item-meta.done {
  color: #34c759;
}

.kx-hub-item b {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
}

.kx-hub-item small {
  font-size: 11.5px;
  font-weight: 400;
  color: rgba(235, 238, 245, 0.62);
  line-height: 1.4;
}

.kx-hub-foot {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.kx-hub-reset {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

.kx-hub-reset:hover {
  color: #ffffff;
}
