/*
 * Atlas Guided Tour — shared spotlight styles
 *
 * Keeping the styles shared prevents Lobby, Colorway, Reel, and Campaign help
 * from drifting apart.
 */

:root {
  --atlas-tour-scrim: rgba(10, 18, 14, 0.72);
  --atlas-tour-focus-border: #78a689;
  --atlas-tour-focus-glow: rgba(120, 166, 137, 0.34);
  --atlas-tour-card-bg: #fffdf7;
  --atlas-tour-card-ink: #17241c;
  --atlas-tour-card-muted: #6f7d75;
  --atlas-tour-card-line: #d8d3c5;
  --atlas-tour-radius: 14px;
  --atlas-tour-focus-gap: 8px;
  --atlas-tour-layer: 1000;
}

.atlas-tour-root,
.atlas-tour-root * {
  box-sizing: border-box;
}

.atlas-tour-root {
  position: fixed;
  inset: 0;
  z-index: var(--atlas-tour-layer);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  color: var(--atlas-tour-card-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  pointer-events: none;
}

.atlas-tour-root[hidden] {
  display: none !important;
}

.atlas-tour-scrim {
  position: fixed;
  z-index: 0;
  background: transparent;
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  pointer-events: auto;
  cursor: default;
}

.atlas-tour-focus-blocker,
.atlas-tour-focus-ring {
  position: fixed;
  border-radius: calc(var(--atlas-tour-radius) + var(--atlas-tour-focus-gap));
}

.atlas-tour-focus-blocker {
  z-index: 1;
  background: transparent;
  box-shadow: 0 0 0 100vmax var(--atlas-tour-scrim);
  pointer-events: auto;
  cursor: default;
}

.atlas-tour-focus-ring {
  z-index: 2;
  border: 2px dashed var(--atlas-tour-focus-border);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.88),
    0 0 0 8px var(--atlas-tour-focus-glow);
  pointer-events: none;
  animation: atlas-tour-focus-pulse 2.2s ease-in-out infinite;
}

.atlas-tour-card {
  position: fixed;
  z-index: 3;
  width: min(380px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 24px));
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--atlas-tour-card-line);
  border-radius: var(--atlas-tour-radius);
  outline: none;
  background: var(--atlas-tour-card-bg);
  box-shadow: 0 24px 80px rgba(7, 17, 11, 0.28);
  pointer-events: auto;
}

.atlas-tour-card:focus-visible {
  box-shadow:
    0 0 0 3px rgba(120, 166, 137, 0.4),
    0 24px 80px rgba(7, 17, 11, 0.28);
}

.atlas-tour-card-header,
.atlas-tour-context,
.atlas-tour-card-footer,
.atlas-tour-navigation {
  display: flex;
  align-items: center;
}

.atlas-tour-card-header,
.atlas-tour-card-footer {
  justify-content: space-between;
  gap: 14px;
}

.atlas-tour-context {
  min-width: 0;
  gap: 9px;
}

.atlas-tour-label,
.atlas-tour-progress {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.atlas-tour-label {
  overflow: hidden;
  color: #275f43;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-tour-progress {
  flex: none;
  color: var(--atlas-tour-card-muted);
  letter-spacing: 0.04em;
}

.atlas-tour-close {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--atlas-tour-card-muted);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.atlas-tour-close:hover,
.atlas-tour-close:focus-visible {
  border-color: var(--atlas-tour-card-line);
  outline: none;
  background: #f4f1e8;
  color: var(--atlas-tour-card-ink);
}

.atlas-tour-title {
  margin: 18px 0 8px;
  color: var(--atlas-tour-card-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.atlas-tour-body {
  margin: 0;
  color: var(--atlas-tour-card-muted);
  font-size: 15px;
  line-height: 1.55;
}

.atlas-tour-card-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--atlas-tour-card-line);
}

.atlas-tour-navigation {
  gap: 8px;
}

.atlas-tour-skip,
.atlas-tour-back,
.atlas-tour-next {
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.atlas-tour-skip {
  padding-left: 4px;
  padding-right: 4px;
  border: 0;
  background: transparent;
  color: var(--atlas-tour-card-muted);
}

.atlas-tour-skip:hover,
.atlas-tour-skip:focus-visible {
  outline: none;
  color: var(--atlas-tour-card-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.atlas-tour-back {
  border: 1px solid var(--atlas-tour-card-line);
  background: transparent;
  color: var(--atlas-tour-card-ink);
}

.atlas-tour-next {
  min-width: 88px;
  border: 1px solid #1f5b3d;
  background: #1f5b3d;
  color: #fff;
}

.atlas-tour-back:hover:not(:disabled),
.atlas-tour-back:focus-visible,
.atlas-tour-next:hover,
.atlas-tour-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 166, 137, 0.32);
}

.atlas-tour-next:hover,
.atlas-tour-next:focus-visible {
  background: #174a31;
}

.atlas-tour-back:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.atlas-tour-help,
.atlas-tour-help * {
  box-sizing: border-box;
}

.atlas-tour-help {
  position: fixed;
  top: 82px;
  right: 22px;
  z-index: calc(var(--atlas-tour-layer) - 100);
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
  color: var(--atlas-tour-card-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.atlas-tour-help-button {
  min-width: 74px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(31, 91, 61, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 9px 25px rgba(7, 17, 11, 0.12);
  color: #1f5b3d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.atlas-tour-help-button::before {
  content: "?";
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: #1f5b3d;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.atlas-tour-help-button:hover,
.atlas-tour-help-button:focus-visible,
.atlas-tour-help-button[aria-expanded="true"] {
  border-color: #1f5b3d;
  outline: none;
  background: #fffdf7;
  box-shadow:
    0 0 0 3px rgba(120, 166, 137, 0.3),
    0 9px 25px rgba(7, 17, 11, 0.12);
}

.atlas-tour-help-menu {
  width: min(320px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid var(--atlas-tour-card-line);
  border-radius: var(--atlas-tour-radius);
  background: var(--atlas-tour-card-bg);
  box-shadow: 0 22px 60px rgba(7, 17, 11, 0.22);
}

.atlas-tour-help-menu[hidden] {
  display: none !important;
}

.atlas-tour-help-eyebrow,
.atlas-tour-help-title,
.atlas-tour-help-description {
  display: block;
}

.atlas-tour-help-eyebrow {
  color: #275f43;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.atlas-tour-help-title {
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
}

.atlas-tour-help-description {
  margin: 7px 0 15px;
  color: var(--atlas-tour-card-muted);
  font-size: 13px;
  line-height: 1.45;
}

.atlas-tour-help-action {
  width: 100%;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--atlas-tour-card-line);
  border-radius: 9px;
  background: transparent;
  color: var(--atlas-tour-card-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.atlas-tour-help-action + .atlas-tour-help-action {
  margin-top: 8px;
}

.atlas-tour-help-action-primary {
  border-color: #1f5b3d;
  background: #1f5b3d;
  color: #fff;
}

.atlas-tour-help-action:hover:not(:disabled),
.atlas-tour-help-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 166, 137, 0.28);
}

.atlas-tour-help-action-primary:hover:not(:disabled),
.atlas-tour-help-action-primary:focus-visible {
  background: #174a31;
}

.atlas-tour-help-action:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@keyframes atlas-tour-focus-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.88), 0 0 0 8px rgba(120,166,137,.22); }
  50% { box-shadow: 0 0 0 3px rgba(255,255,255,.96), 0 0 0 12px rgba(120,166,137,.38); }
}

@media (max-width: 720px) {
  .atlas-tour-help {
    top: 72px;
    right: 14px;
    bottom: auto;
  }

  .atlas-tour-card {
    right: 12px;
    bottom: 12px;
    left: 12px !important;
    width: auto;
    max-height: min(52dvh, 480px);
    padding: 18px;
  }

  .atlas-tour-title {
    font-size: 26px;
  }

  .atlas-tour-body {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .atlas-tour-card-footer {
    align-items: flex-end;
  }

  .atlas-tour-skip,
  .atlas-tour-back,
  .atlas-tour-next {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-tour-focus-ring {
    animation: none;
  }

  .atlas-tour-root *,
  .atlas-tour-root *::before,
  .atlas-tour-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
