/*
 * POWER HABITS
 * Guided Tour / Onboarding V1
 */

html.ph-tour-active,
body.ph-tour-active {
  overflow: hidden;
}

.ph-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.56);
}

.ph-tour-spotlight {
  position: fixed;
  z-index: 2147483001;
  border-radius: 16px;
  pointer-events: none;

  border: 2px solid rgba(255, 255, 255, 0.90);

  box-shadow:
    0 0 0 9999px rgba(15, 23, 42, 0.56),
    0 6px 24px rgba(15, 23, 42, 0.24);

  transition:
    top 180ms ease,
    left 180ms ease,
    width 180ms ease,
    height 180ms ease;
}

.ph-tour-tooltip {
  position: fixed;
  z-index: 2147483002;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-sizing: border-box;

  background: var(--surface, #ffffff);
  color: var(--text, #172033);

  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;

  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.24),
    0 8px 20px rgba(15, 23, 42, 0.12);

  padding: 22px;
}

.ph-tour-tooltip.ph-tour-centered {
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ph-tour-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  opacity: 1;
}

.ph-tour-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;

  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;

  background: none !important;
  background-image: none !important;

  opacity: 1 !important;
}

.ph-tour-text {
  margin: 12px 0 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: #334155;
  opacity: 1;
}

.ph-tour-progress {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.ph-tour-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.18;
}

.ph-tour-progress-dot.is-active {
  width: 22px;
  opacity: 0.8;
}

.ph-tour-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.ph-tour-progress-row .ph-tour-progress {
  margin-top: 0;
}

.ph-tour-progress-count {
  flex: 0 0 auto;
  font-size: 0.78rem;
  line-height: 1;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.ph-tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.ph-tour-actions button {
  min-height: 42px;
}

.ph-tour-skip {
  margin-right: auto;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding-inline: 4px 10px;
  opacity: 0.68;
}

.ph-tour-skip:hover,
.ph-tour-skip:focus-visible {
  opacity: 1;
}

.ph-tour-back,
.ph-tour-next {
  border-radius: 12px;
  cursor: pointer;
  padding: 10px 15px;
}

.ph-tour-back {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: transparent;
  color: inherit;
}

.ph-tour-next {
  border: 0;
  background: var(--accent, #2563eb);
  color: #ffffff;
  font-weight: 700;
}

.ph-tour-back:disabled {
  opacity: 0.38;
  cursor: default;
}

.ph-tour-menu-button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ph-tour-tooltip {
    width: calc(100vw - 24px);
    padding: 18px;
    border-radius: 16px;
  }

  .ph-tour-title {
    font-size: 1.18rem;
  }

  .ph-tour-actions {
    flex-wrap: wrap;
  }

  .ph-tour-skip {
    flex: 1 0 100%;
    margin: 0;
    text-align: left;
  }

  .ph-tour-back,
  .ph-tour-next {
    flex: 1;
  }
}

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

/*
 * Guided Tour V1
 * Normalizacao do item "Refazer tour guiado" no menu.
 * O item e um <button>, enquanto os demais sao <a>.
 */
#restart-guided-tour.ph-tour-menu-button {
  appearance: none;
  -webkit-appearance: none;

  display: block;
  box-sizing: border-box;

  width: 100%;
  min-width: 0;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;
  background: transparent;

  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;

  text-align: left;
  text-decoration: none;

  cursor: pointer;
}

/*
 * Guided Tour V1
 * O tema original do Power Habits controla a cor deste item.
 * Aqui normalizamos apenas o comportamento de interacao.
 */
#restart-guided-tour.ph-tour-menu-button {
  opacity: 1;
  filter: none;
}

#restart-guided-tour.ph-tour-menu-button:hover {
  text-decoration: underline;
}
