/* [2026-03-28][CLX][ONBOARDING] Стили интерактивного тура */

/* ── Overlay (затемнение фона) ── */
.onb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, .55);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.onb-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Highlight box (подсветка элемента) ── */
.onb-highlight {
  position: absolute;
  z-index: 9001;
  border-radius: 8px;
  box-shadow:
    0 0 0 4000px rgba(20, 16, 12, .55),
    0 0 0 3px var(--copper, #B87333),
    0 0 16px rgba(184, 115, 51, .35);
  pointer-events: none;
  opacity: 0;
  transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease, opacity .3s ease;
}
.onb-highlight.active {
  opacity: 1;
}

/* ── Tooltip ── */
.onb-tooltip {
  position: absolute;
  z-index: 9002;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #FFFBF5;
  border: 1px solid rgba(184, 115, 51, .25);
  border-radius: 12px;
  box-shadow:
    0 4px 24px rgba(44, 36, 32, .18),
    0 1px 4px rgba(44, 36, 32, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.onb-tooltip.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Progress bar */
.onb-tooltip__progress {
  height: 3px;
  background: rgba(184, 115, 51, .12);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.onb-tooltip__bar {
  height: 100%;
  background: var(--copper, #B87333);
  border-radius: 3px;
  transition: width .3s ease;
}

/* Step count */
.onb-tooltip__step-count {
  padding: 10px 16px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--copper, #B87333);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Title */
.onb-tooltip__title {
  margin: 4px 16px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #2C2420;
  line-height: 1.3;
}

/* Text */
.onb-tooltip__text {
  margin: 6px 16px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5A4D42;
}

/* Actions (Назад / Далее) */
.onb-tooltip__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
  gap: 8px;
}
.onb-tooltip__actions .btn {
  min-height: 36px;
  min-width: 44px;
  font-size: 13px;
}

/* Skip */
.onb-tooltip__skip {
  display: block;
  width: 100%;
  padding: 6px 16px 12px;
  background: none;
  border: none;
  font-size: 11px;
  color: #7A6B5A;
  cursor: pointer;
  text-align: center;
  transition: color .15s;
}
.onb-tooltip__skip:hover {
  color: var(--copper, #B87333);
}

/* ── Intro modal (Слой 1: workflow) ── */
.onb-intro {
  position: fixed;
  inset: 0;
  z-index: 9010;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 12, .6);
  opacity: 0;
  transition: opacity .3s ease;
}
.onb-intro.active {
  opacity: 1;
}

.onb-intro__card {
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #FFFBF5;
  border-radius: 16px;
  box-shadow:
    0 8px 40px rgba(44, 36, 32, .2),
    0 2px 8px rgba(44, 36, 32, .08);
  transform: scale(.95) translateY(16px);
  transition: transform .3s ease;
}
.onb-intro.active .onb-intro__card {
  transform: scale(1) translateY(0);
}

.onb-intro__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 0;
}
.onb-intro__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--copper, #B87333);
}
.onb-intro__title {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #2C2420;
}

.onb-intro__steps {
  padding: 16px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.onb-intro__step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.onb-intro__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(184, 115, 51, .12);
  color: var(--copper, #B87333);
  font-size: 12px;
  font-weight: 700;
}
.onb-intro__text {
  font-size: 13px;
  line-height: 1.5;
  color: #3D332B;
  padding-top: 2px;
}

.onb-intro__note {
  margin: 16px 24px 0;
  padding: 12px 14px;
  background: rgba(107, 143, 113, .08);
  border-left: 3px solid #6B8F71;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #3D5A42;
}

.onb-intro__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px 24px 24px;
}
.onb-intro__actions .btn {
  min-height: 40px;
  min-width: 44px;
  font-size: 14px;
}

/* ── Кнопка ? в header ── */
.btn-onboarding {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 251, 245, .3);
  background: rgba(255, 251, 245, .08);
  color: #FFFBF5;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  margin-right: 4px;
}
.btn-onboarding:hover {
  background: rgba(184, 115, 51, .25);
  border-color: var(--copper, #B87333);
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .onb-overlay,
  .onb-highlight,
  .onb-tooltip,
  .onb-intro,
  .onb-intro__card {
    transition: none;
  }
}
