/* Shared focus tutorial chrome (spotlight + card) - path editor + dashboard */

html.pb-tour-active {
  /* Allow interacting with the highlighted UI under the dim overlay. */
  /* (overflow still locked so the tour doesn't shift with page scroll) */
  overflow: hidden;
}

.pb-tour {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.pb-tour.is-open {
  pointer-events: none;
}

.pb-tour-spots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.pb-tour-spots.is-multi::before,
.pb-tour-spots.is-veil::before {
  content: '';
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, #0b1220 58%, transparent);
  pointer-events: none;
}

.pb-tour-spots.is-multi::before {
  -webkit-mask-image: var(--pb-tour-mask);
  mask-image: var(--pb-tour-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pb-tour-spot {
  position: fixed;
  border-radius: var(--bp-card-radius, 12px);
  background: transparent;
  pointer-events: none;
  transition:
    left var(--dur-slow, .28s) var(--ease-emphasis, cubic-bezier(.2, .8, .2, 1)),
    top var(--dur-slow, .28s) var(--ease-emphasis, cubic-bezier(.2, .8, .2, 1)),
    width var(--dur-slow, .28s) var(--ease-emphasis, cubic-bezier(.2, .8, .2, 1)),
    height var(--dur-slow, .28s) var(--ease-emphasis, cubic-bezier(.2, .8, .2, 1));
}

/* Single-target: ring + full-page dim via box-shadow */
.pb-tour-spot.is-primary {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--c-primary) 72%, #fff),
    0 0 0 9999px color-mix(in srgb, #0b1220 58%, transparent);
}

/* Multi-target: ring only; dim comes from .pb-tour-spots.is-multi::before */
.pb-tour-spot.is-cutout {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 72%, #fff);
}

/* Reuse system `.card` chrome; only pin + size for the tour overlay. */
.pb-tour-card.card {
  position: fixed;
  z-index: 1;
  box-sizing: border-box;
  width: 320px;
  max-width: calc(100vw - 24px);
  margin: 0;
  overflow: hidden;
  pointer-events: auto;
  animation: pb-tour-card-in var(--dur-slow, .28s) var(--ease-emphasis, cubic-bezier(.2, .8, .2, 1));
}

.pb-tour-card.is-action-done {
  box-shadow:
    var(--bp-shadow),
    0 0 0 2px color-mix(in srgb, var(--c-success, #16a34a) 55%, transparent);
}

.pb-tour-card__header.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 0;
}

.pb-tour-progress {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  line-height: 1.2;
}

.pb-tour-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--c-text);
}

.pb-tour-card__body.card-body {
  padding: 0.85rem 1rem 0.35rem;
}

.pb-tour-body {
  margin: 0;
  line-height: 1.45;
}

/* Same chrome bar as .card-header - sits between body and footer. */
.pb-tour-todo.card-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin: var(--bp-card-inset, 0.55rem);
  margin-top: 0.35rem;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.7rem;
}

.pb-tour-todo__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  line-height: 1.2;
}

.pb-tour-todo__task {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius, 8px);
  background: color-mix(in srgb, var(--c-primary) 14%, var(--bp-card-bg, #fff));
  color: var(--c-primary);
}

.pb-tour-todo__dot {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--c-primary);
}

.pb-tour-action-label {
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-primary);
}

.pb-tour-card__footer.card-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pb-tour-dismiss {
  display: flex;
  align-items: center;
  padding: 0.15rem 1rem 0.55rem;
}

.pb-tour-dont-show {
  max-width: 100%;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--c-text-muted);
}

.pb-tour-dont-show .toggle-track {
  --bp-toggle-on: 14px;
  width: 34px;
  height: 20px;
}

.pb-tour-dont-show .toggle-track::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
}

.pb-tour-dont-show .toggle-label {
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
}

.pb-tour-actions-spacer {
  flex: 1;
  min-width: 0.25rem;
}

@keyframes pb-tour-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-tour-spot {
    transition: none;
  }

  .pb-tour-card.card {
    animation: none;
  }
}

/* Tutorials flyout lives on the account menu; keep it visible in the path editor too. */
.topbar-user-menu-widgets > .bp-menu-wrap.topbar-user-menu-tour-wrap {
  display: flex;
  min-width: 0;
}

.topbar-user-menu-widgets > .bp-menu-wrap.topbar-user-menu-tour-wrap > .topbar-user-menu-widget {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

#dash-tour-btn .bp-icon-mask {
  width: var(--bp-icon-size-md, 1.25rem);
  height: var(--bp-icon-size-md, 1.25rem);
  display: block;
}
