/* Step-by-step demo tour — dimming cut-out + anchored popup */

/* Must beat any author rule that sets display on the modal (e.g. display:flex) */
.nexterra-tour-dim-root.is-tour-hidden,
.nexterra-tour-modal.is-tour-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.nexterra-tour-dim-root {
  position: fixed;
  inset: 0;
  z-index: 200000;
  pointer-events: none;
}

.nexterra-tour-dim {
  position: fixed;
  background: rgba(28, 25, 23, 0.52);
  pointer-events: none;
  display: none;
}

.nexterra-tour-dim-full {
  inset: 0;
  display: none;
}

.nexterra-tour-dim-root[data-mode="full"] .nexterra-tour-dim-full {
  display: block;
}

.nexterra-tour-dim-root[data-mode="hole"] .nexterra-tour-dim-t,
.nexterra-tour-dim-root[data-mode="hole"] .nexterra-tour-dim-b,
.nexterra-tour-dim-root[data-mode="hole"] .nexterra-tour-dim-l,
.nexterra-tour-dim-root[data-mode="hole"] .nexterra-tour-dim-r {
  display: block;
}

.nexterra-tour-modal {
  position: fixed;
  z-index: 200010;
  width: min(380px, calc(100vw - 24px));
  max-height: min(68vh, 480px);
  display: flex;
  flex-direction: column;
  background: #fafaf9;
  color: #1c1917;
  border-radius: 16px;
  border: 1px solid rgba(120, 113, 108, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  overflow: hidden;
}

/* Welcome / no-target: centred */
.nexterra-tour-modal--centered {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nexterra-tour-modal--anchored {
  transform: none;
  left: auto;
  top: auto;
}

.nexterra-tour-modal__head {
  padding: 14px 16px 8px;
  border-bottom: 1px solid rgba(120, 113, 108, 0.12);
}

.nexterra-tour-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #9a3412;
}

.nexterra-tour-modal__progress {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #78716c;
}

.nexterra-tour-modal__body {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.nexterra-tour-modal__body p {
  margin: 0 0 8px;
}

.nexterra-tour-modal__body p:last-child {
  margin-bottom: 0;
}

.nexterra-tour-modal__body strong {
  color: #292524;
}

.nexterra-tour-modal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(120, 113, 108, 0.12);
  background: rgba(255, 247, 237, 0.5);
}

.nexterra-tour-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 113, 108, 0.22);
  cursor: pointer;
  background: #fff;
  color: #1c1917;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nexterra-tour-btn:hover {
  background: #fff7ed;
  border-color: rgba(154, 52, 18, 0.35);
}

.nexterra-tour-btn--primary {
  background: #c2410c;
  border-color: #9a3412;
  color: #fff;
}

.nexterra-tour-btn--primary:hover {
  background: #ea580c;
  border-color: #c2410c;
  color: #fff;
}

.nexterra-tour-btn--ghost {
  background: transparent;
}

.nexterra-tour-skip {
  margin-right: auto;
  font-size: 12px;
  font-weight: 600;
  color: #78716c;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 4px;
}

.nexterra-tour-skip:hover {
  color: #44403c;
}

#nexterra-tour-launch {
  flex-shrink: 0;
}

.nexterra-tour-target {
  position: relative;
  z-index: 200005 !important;
  outline: 3px solid #ea580c !important;
  outline-offset: 3px !important;
  border-radius: 8px;
  transition: outline 0.2s ease, outline-offset 0.2s ease;
}

@media (max-width: 520px) {
  .nexterra-tour-modal--centered {
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translate(-50%, 0);
    max-height: min(58vh, 440px);
  }

  .nexterra-tour-modal--anchored {
    max-height: min(52vh, 400px);
  }
}
