/**
 * Decto onboarding — fullscreen luxury wizard
 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&display=swap');

body.decto-onboarding-open {
  overflow: hidden !important;
}

.decto-onboarding {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  /* Match site glass stage — sage / champagne, not dark green */
  background:
    radial-gradient(1100px 560px at 92% -12%, rgba(197, 164, 109, 0.22), transparent 55%),
    radial-gradient(900px 640px at -10% 108%, rgba(23, 56, 47, 0.14), transparent 58%),
    radial-gradient(720px 320px at 48% -6%, rgba(255, 255, 255, 0.5), transparent 62%),
    linear-gradient(165deg, #e4ede8 0%, #d5e2db 44%, #eaf1ed 100%);
  overflow: hidden;
}

.decto-onboarding[hidden] { display: none !important; }

.decto-onboarding::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.55), transparent 32%),
    radial-gradient(circle at 78% 72%, rgba(197, 164, 109, 0.18), transparent 34%);
  animation: decto-onb-glow 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.decto-onboarding::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 56, 47, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 56, 47, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}

@keyframes decto-onb-glow {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

.decto-onboarding__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: transparent;
  color: #17382F;
  font-family: 'Peyda', 'Vazirmatn', system-ui, sans-serif;
}

.decto-onboarding__panel--results {
  width: 100%;
  max-height: none;
}

.decto-onboarding__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  animation: decto-onb-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.decto-onboarding__mascot {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(201, 164, 94, 0.35);
}

.decto-onboarding__top strong {
  display: block;
  font-family: 'Cormorant Garamond', 'Peyda', serif;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #17382F;
}

.decto-onboarding__top span {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: rgba(23, 56, 47, 0.62);
}

.decto-onboarding__close {
  margin-inline-start: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: #17382F;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 8px 22px rgba(15, 36, 29, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.decto-onboarding__close:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: scale(1.04);
}

.decto-onboarding__progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(23, 56, 47, 0.1);
  margin-bottom: 22px;
  overflow: hidden;
}

.decto-onboarding__progress span {
  display: block;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #c9a45e, #f0d9a0, #8fd4b5);
  background-size: 200% 100%;
  animation: decto-onb-shine 2.8s linear infinite;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 16px rgba(201, 164, 94, 0.45);
}

@keyframes decto-onb-shine {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

.decto-onboarding__step {
  flex: 1 1 auto;
  width: min(720px, 100%);
  margin-inline: auto;
  animation: decto-onb-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes decto-onb-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.decto-onboarding__step h2 {
  margin: 0 0 16px;
  font-family: 'Cormorant Garamond', 'Peyda', serif;
  font-size: clamp(1.55rem, 4.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #17382F;
  text-shadow: none;
}

.decto-onb-step-actions {
  margin-top: 14px;
}

.decto-onb-step-actions:empty {
  display: none;
}

.decto-onboarding__step p {
  margin: 0 0 20px;
  color: rgba(23, 56, 47, 0.68);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 38rem;
}

.decto-onb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.decto-onb-chip {
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(244, 249, 246, 0.58) 54%, rgba(240, 217, 160, 0.18));
  color: #17382F;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 10px 24px rgba(15, 36, 29, 0.08);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.decto-onb-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 164, 109, 0.45);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 28px rgba(15, 36, 29, 0.1);
}

.decto-onb-chip.is-active {
  background: linear-gradient(135deg, rgba(23, 56, 47, 0.92), rgba(41, 72, 61, 0.9), rgba(197, 164, 109, 0.66));
  border-color: rgba(197, 164, 109, 0.28);
  color: #fffdf9;
  box-shadow: 0 14px 32px rgba(15, 36, 29, 0.22);
  transform: translateY(-1px);
}

.decto-onboarding__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  background: rgba(255, 255, 255, 0.62);
  color: #17382F;
  font: inherit;
  margin-bottom: 8px;
  box-sizing: border-box;
  outline: none;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 24px rgba(15, 36, 29, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.decto-onboarding__input::placeholder {
  color: rgba(23, 56, 47, 0.42);
}

.decto-onboarding__input:focus {
  border-color: rgba(197, 164, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(197, 164, 109, 0.16);
}

.decto-onb-photo {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.decto-onb-photo__pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(197, 164, 109, 0.5);
  background: rgba(255, 255, 255, 0.55);
  color: #17382F;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.decto-onb-photo__preview {
  width: min(220px, 70vw);
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 94, 0.28);
}

.decto-onb-photo__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.decto-onb-photo__clear {
  border: 0;
  background: transparent;
  color: #ffb4b4;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.decto-onb-photo__hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: rgba(23, 56, 47, 0.55);
}

.decto-onboarding__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 22px;
  padding-top: 4px;
  width: min(720px, 100%);
  margin-inline: auto;
  animation: decto-onb-rise 0.6s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.decto-onboarding__footer--inline {
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: stretch;
  gap: 10px;
}

.decto-onboarding__footer--inline .decto-onb-btn--ghost,
.decto-onboarding__footer--inline .decto-onb-btn--primary {
  flex: 1 1 0;
  min-width: 0;
}

.decto-onb-btn--ghost,
.decto-onb-btn--primary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.decto-onb-btn--ghost {
  border: 1px solid rgba(23, 56, 47, 0.14);
  background: rgba(255, 255, 255, 0.55);
  color: #17382F;
  backdrop-filter: blur(12px);
}

.decto-onb-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.72);
}

.decto-onb-btn--primary {
  border: 0;
  background: linear-gradient(135deg, rgba(23, 56, 47, 0.94), rgba(41, 72, 61, 0.9), rgba(197, 164, 109, 0.66));
  color: #fffdf9;
  box-shadow: 0 14px 36px rgba(15, 36, 29, 0.22);
}

.decto-onb-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(15, 36, 29, 0.28);
}

.decto-onboarding__step--results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(760px, 100%);
}

.decto-onb-results__intro h2 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', 'Peyda', serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: #17382F;
  text-shadow: none;
}

.decto-onb-results__intro p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(23, 56, 47, 0.68);
}

.decto-onb-results__enter {
  margin-top: 18px;
  padding-top: 4px;
}

.decto-onb-results__enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(23, 56, 47, 0.94), rgba(41, 72, 61, 0.9), rgba(197, 164, 109, 0.66));
  color: #fffdf9;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(15, 36, 29, 0.22);
}

.decto-onb-results__loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 8px;
  color: rgba(23, 56, 47, 0.72);
  font-size: 0.9rem;
}

.decto-onb-results__loading[hidden] { display: none !important; }

.decto-onb-results__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-inline-end: 2px;
}

.decto-onb-results__posts h3,
.decto-onb-results__doctors h3 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 900;
  color: #17382F;
  display: flex;
  align-items: center;
  gap: 8px;
}

.decto-onb-results__scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.decto-onb-post-card {
  flex: 0 0 142px;
  scroll-snap-align: start;
  display: grid;
  gap: 7px;
  padding: 9px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(244, 249, 246, 0.58));
  border: 1px solid rgba(23, 56, 47, 0.1);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 24px rgba(15, 36, 29, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.decto-onb-post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 164, 109, 0.4);
}

.decto-onb-post-card img,
.decto-onb-post-card__ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
}

.decto-onb-post-card__ph {
  display: block;
  background: linear-gradient(145deg, #d8e4de, #c5d5cc);
}

.decto-onb-post-card strong {
  font-size: 0.7rem;
  line-height: 1.4;
  color: #17382F;
}

.decto-onb-post-card small {
  font-size: 0.64rem;
  color: rgba(23, 56, 47, 0.55);
}

.decto-onb-results__doctor-list {
  display: grid;
  gap: 10px;
}

.decto-onb-doc-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(244, 249, 246, 0.58));
  border: 1px solid rgba(23, 56, 47, 0.1);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 24px rgba(15, 36, 29, 0.08);
}

.decto-onb-doc-card.is-disabled { opacity: 0.55; pointer-events: none; }

.decto-onb-doc-card__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(197, 164, 109, 0.35);
}

.decto-onb-doc-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.decto-onb-doc-card__head strong {
  font-size: 0.9rem;
  color: #17382F;
}

.decto-onb-doc-card__score {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(197, 164, 109, 0.22);
  font-size: 0.7rem;
  font-weight: 800;
  color: #17382F;
}

.decto-onb-doc-card__meta,
.decto-onb-doc-card__rating,
.decto-onb-doc-card__price {
  margin: 3px 0 0;
  font-size: 0.74rem;
  color: rgba(23, 56, 47, 0.62);
}

.decto-onb-doc-card__rating i { color: #c9a45e; }

.decto-onb-doc-card__chev {
  color: rgba(23, 56, 47, 0.4);
  font-size: 0.75rem;
}

.decto-onb-results__empty {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(23, 56, 47, 0.1);
  font-size: 0.84rem;
  color: rgba(23, 56, 47, 0.7);
}

.decto-onb-budget {
  display: grid;
  gap: 10px;
}

.decto-onb-budget__card {
  display: grid;
  gap: 4px;
  text-align: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(23, 56, 47, 0.12);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(244, 249, 246, 0.52) 54%, rgba(240, 217, 160, 0.16));
  color: #17382F;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82) inset, 0 10px 24px rgba(15, 36, 29, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.decto-onb-budget__card strong {
  font-size: 0.98rem;
  font-weight: 900;
}

.decto-onb-budget__card span {
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(23, 56, 47, 0.62);
}

.decto-onb-budget__card:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 164, 109, 0.45);
}

.decto-onb-budget__card.is-active {
  background: linear-gradient(135deg, rgba(23, 56, 47, 0.94), rgba(41, 72, 61, 0.9), rgba(197, 164, 109, 0.66));
  border-color: rgba(197, 164, 109, 0.28);
  color: #fffdf9;
  box-shadow: 0 16px 34px rgba(15, 36, 29, 0.22);
}

.decto-onb-budget__card.is-active span {
  color: rgba(255, 253, 249, 0.82);
}

/* Luxury edge dock — always on user pages */
.decto-smart-pick {
  position: fixed;
  top: 46%;
  inset-inline-end: 0;
  z-index: 420;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 16px 10px 18px;
  width: 64px;
  border: 1px solid rgba(197, 164, 109, 0.38);
  border-inline-end: 0;
  border-radius: 22px 0 0 22px;
  background:
    linear-gradient(165deg, rgba(255, 252, 246, 0.78), rgba(232, 239, 234, 0.52) 48%, rgba(197, 164, 109, 0.28));
  color: #17382F;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    -10px 18px 40px rgba(15, 36, 29, 0.16);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

html[dir="ltr"] .decto-smart-pick {
  border-radius: 0 22px 22px 0;
  border-inline-end: 1px solid rgba(197, 164, 109, 0.38);
  border-inline-start: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    10px 18px 40px rgba(15, 36, 29, 0.16);
}

.decto-smart-pick__gem {
  position: absolute;
  inset: -30% -40% auto auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 217, 160, 0.55), transparent 68%);
  pointer-events: none;
  animation: decto-smart-gem 5.5s ease-in-out infinite alternate;
}

.decto-smart-pick__icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #f0d9a0, #c9a45e 58%, #17382F);
  color: #fffdf9;
  font-size: 0.92rem;
  box-shadow: 0 8px 18px rgba(197, 164, 109, 0.38);
}

.decto-smart-pick__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
}

.decto-smart-pick__copy em,
.decto-smart-pick__copy strong {
  font-style: normal;
  font-family: 'Peyda', 'Vazirmatn', sans-serif;
  line-height: 1.15;
}

.decto-smart-pick__copy em {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(23, 56, 47, 0.72);
}

.decto-smart-pick__copy strong {
  font-size: 0.92rem;
  font-weight: 900;
  color: #17382F;
}

.decto-smart-pick:hover,
.decto-smart-pick:focus-visible {
  transform: translateY(-50%) translateX(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    -14px 22px 46px rgba(15, 36, 29, 0.2);
  outline: none;
}

html[dir="ltr"] .decto-smart-pick:hover,
html[dir="ltr"] .decto-smart-pick:focus-visible {
  transform: translateY(-50%) translateX(4px);
}

@keyframes decto-smart-gem {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(-12%, 18%, 0) scale(1.18); opacity: 1; }
}

body.decto-onboarding-open .decto-smart-pick,
body.bn-explore-reels-open .decto-smart-pick,
body.auth-page .decto-smart-pick,
body.decto-map-open .decto-smart-pick,
body.bn-chat-active .decto-smart-pick,
.decto-smart-pick.is-provider-hidden,
.decto-smart-pick[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .decto-onboarding__panel {
    padding:
      max(14px, env(safe-area-inset-top))
      14px
      max(14px, env(safe-area-inset-bottom))
      14px;
  }

  .decto-onboarding__footer {
    justify-content: stretch;
  }

  .decto-onb-btn--ghost,
  .decto-onb-btn--primary {
    flex: 1 1 auto;
  }

  .decto-smart-pick {
    width: 56px;
    padding: 14px 8px 16px;
    top: auto;
    bottom: calc(var(--bn-bottom-dock-h, 72px) + 18px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  .decto-smart-pick:hover,
  .decto-smart-pick:focus-visible {
    transform: translateX(-3px);
  }

  html[dir="ltr"] .decto-smart-pick:hover,
  html[dir="ltr"] .decto-smart-pick:focus-visible {
    transform: translateX(3px);
  }

  body.index-page .decto-smart-pick {
    bottom: max(24px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .decto-onboarding::before,
  .decto-onboarding__progress span,
  .decto-onboarding__step,
  .decto-onboarding__top,
  .decto-onboarding__footer,
  .decto-smart-pick__gem {
    animation: none !important;
  }
}
