/* ═══════════════════════════════════════════════════════════
   onboarding.css — Fishka Onboarding v5

   Z-INDEX:
   overlay  = 99990  (затемнение)
   nav/target = 99992  (подсветка — видна над затемнением)
   card     = 99995  (карточка — ВСЕГДА поверх)

   Экран НЕ скроллится. Навбар НЕ двигается.
   ═══════════════════════════════════════════════════════════ */

.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.ob-overlay.ob-hidden {
  display: none !important;
}

/* ─── Card — fixed, ВСЕГДА поверх ─── */
.ob-card {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 30vh;
  z-index: 99995;
  width: min(88vw, 370px);
  max-height: 70vh;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 22px;
  background: linear-gradient(170deg, #1a2640 0%, #101828 100%);
  border: 1.5px solid rgba(120, 180, 255, 0.18);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(80, 140, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 22px 18px 16px;
  color: #edf2f9;
  pointer-events: auto;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ob-card.ob-no-transition {
  transition: none !important;
}

.ob-card.ob-enter .ob-icon,
.ob-card.ob-enter .ob-title,
.ob-card.ob-enter .ob-text {
  animation: obFadeIn 0.3s ease both;
}

@keyframes obFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 6px;
}

.ob-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 6px;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.ob-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 14px;
  color: rgba(210, 225, 245, 0.85);
}

.ob-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-bottom: 14px;
}

.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.ob-dot-on {
  width: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, #7bb8ff, #5a9ef5);
  box-shadow: 0 0 8px rgba(90, 158, 245, 0.45);
}

.ob-dot-done {
  background: rgba(120, 180, 255, 0.4);
}

.ob-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}

/* Когда Назад скрыт — Пропустить и Дальше делят пространство */

.ob-btn {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 16px;
  height: 48px;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-btn:active {
  transform: scale(0.93);
  filter: brightness(0.82);
}

.ob-btn-next {
  background: linear-gradient(135deg, #5e9eff 0%, #3d7be8 100%);
  color: #fff;
  box-shadow:
    0 6px 20px rgba(61, 123, 232, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex: 1.2;
}

.ob-btn-skip {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(220, 230, 245, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ob-btn-back {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(200, 215, 235, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ─── Target ─── */
.ob-target {
  border-radius: 16px !important;
  outline: 3px solid rgba(100, 175, 255, 0.8) !important;
  outline-offset: 6px !important;
  box-shadow:
    0 0 0 6px rgba(100, 170, 255, 0.15),
    0 0 20px rgba(80, 150, 255, 0.55),
    0 0 40px rgba(80, 150, 255, 0.25) !important;
  animation: obPulse 1.3s ease-in-out infinite;
}

@keyframes obPulse {
  0%, 100% {
    box-shadow:
      0 0 0 5px rgba(100, 170, 255, 0.1),
      0 0 14px rgba(80, 150, 255, 0.35),
      0 0 28px rgba(80, 150, 255, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(120, 190, 255, 0.22),
      0 0 28px rgba(90, 160, 255, 0.7),
      0 0 50px rgba(90, 160, 255, 0.3);
  }
}


/* ═══ ТЕМА 2 — Cloud ═══ */

[data-theme="2"] .ob-overlay {
  background: rgba(150, 140, 125, 0.5);
}

[data-theme="2"] .ob-card {
  background: linear-gradient(170deg, #ece6df 0%, #e0d9d1 100%);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow:
    6px 6px 18px rgba(0, 0, 0, 0.14),
    -3px -3px 10px rgba(255, 255, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #2c2520;
}

[data-theme="2"] .ob-title { color: #1a1510; }
[data-theme="2"] .ob-text  { color: rgba(44, 37, 32, 0.72); }
[data-theme="2"] .ob-dot   { background: rgba(0, 0, 0, 0.12); }

[data-theme="2"] .ob-dot-on {
  background: linear-gradient(90deg, #7a6245, #96794e);
  box-shadow: 0 0 8px rgba(122, 98, 69, 0.4);
}

[data-theme="2"] .ob-dot-done { background: rgba(122, 98, 69, 0.35); }

[data-theme="2"] .ob-btn-next {
  background: linear-gradient(135deg, #6b5535, #8a6d42);
  color: #fff;
  box-shadow:
    0 4px 14px rgba(107, 85, 53, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="2"] .ob-btn-skip {
  background: rgba(44, 37, 32, 0.1);
  color: rgba(44, 37, 32, 0.75);
  border: 1.5px solid rgba(44, 37, 32, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="2"] .ob-btn-back {
  background: rgba(44, 37, 32, 0.06);
  color: rgba(44, 37, 32, 0.6);
  border: 1.5px solid rgba(44, 37, 32, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

[data-theme="2"] .ob-target {
  outline-color: rgba(122, 98, 69, 0.75) !important;
  box-shadow:
    0 0 0 6px rgba(122, 98, 69, 0.14),
    0 0 18px rgba(122, 98, 69, 0.45),
    0 0 36px rgba(122, 98, 69, 0.18) !important;
}


/* ═══ ТЕМА 5 — Aegean ═══ */

[data-theme="5"] .ob-overlay {
  background: rgba(8, 20, 30, 0.55);
}

[data-theme="5"] .ob-card {
  background: linear-gradient(170deg, #162a3a 0%, #0e1f2d 100%);
  border-color: rgba(80, 180, 200, 0.15);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(50, 160, 180, 0.06);
}

[data-theme="5"] .ob-dot-on {
  background: linear-gradient(90deg, #4db8c7, #3a9fae);
  box-shadow: 0 0 8px rgba(77, 184, 199, 0.4);
}

[data-theme="5"] .ob-dot-done { background: rgba(77, 184, 199, 0.35); }

[data-theme="5"] .ob-btn-next {
  background: linear-gradient(135deg, #4db8c7, #3a9fae);
  box-shadow: 0 5px 16px rgba(58, 159, 174, 0.35);
}

[data-theme="5"] .ob-target {
  outline-color: rgba(77, 184, 199, 0.75) !important;
  box-shadow:
    0 0 0 6px rgba(77, 184, 199, 0.14),
    0 0 18px rgba(77, 184, 199, 0.5),
    0 0 36px rgba(77, 184, 199, 0.2) !important;
}
