/* ===========================================
   Sidebar tour (dashboard/_app_tour, app_tour_controller.js)
   Sits above page modals and below toasts.
   =========================================== */

/* Catches clicks so the page can't be used until the tour is closed */
.app-tour__backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

/* A clear window over the highlighted tab; its shadow dims everything else */
.app-tour__spotlight {
  position: fixed;
  z-index: 9001;
  box-sizing: border-box;
  border-radius: 10px;
  border: 2px solid #F97316;
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, 0.55);
  pointer-events: none;
}

.app-tour__popover {
  --app-tour-arrow-top: 50%;
  position: fixed;
  z-index: 9002;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 18px 20px 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.25);
}

/* Arrow pointing back at the highlighted tab */
.app-tour__popover::before {
  content: "";
  position: absolute;
  top: var(--app-tour-arrow-top);
  left: -7px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
}

.app-tour--ready .app-tour__spotlight {
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.app-tour--ready .app-tour__popover {
  transition: top 0.25s ease;
}

.app-tour__count {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
}

.app-tour__label {
  color: #F97316;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-tour__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.app-tour__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #4B5563;
}

.app-tour__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-tour__nav {
  display: flex;
  gap: 8px;
}

.app-tour__skip,
.app-tour__back,
.app-tour__next {
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.app-tour__skip {
  padding: 8px 0;
  background: none;
  color: #6B7280;
  font-weight: 500;
}

.app-tour__skip:hover {
  color: #374151;
  text-decoration: underline;
}

.app-tour__back {
  padding: 8px 14px;
  background: white;
  color: #374151;
  border: 1px solid #D1D5DB;
}

.app-tour__back:hover {
  background: #F9FAFB;
}

.app-tour__next {
  padding: 8px 18px;
  background: #F97316;
  color: white;
}

.app-tour__next:hover {
  background: #EA580C;
}

.app-tour__skip:focus-visible,
.app-tour__back:focus-visible,
.app-tour__next:focus-visible {
  outline: 2px solid #F97316;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .app-tour--ready .app-tour__spotlight,
  .app-tour--ready .app-tour__popover {
    transition: none;
  }
}
