/* ═══════════════════════════════════════════════════
   SHEETS, UPSELL, MODAL AND PAGE BLOCKS
   ═══════════════════════════════════════════════════ */

/* ── Danger solid button ── */
.btn--danger-solid {
  flex: 1;
  padding: 10px;
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Images gradually sharpen as their decoded pixels become available. */
.image-resolving {
  background: linear-gradient(110deg, var(--surface-2, #eee8e5) 25%, #fff7f4 45%, var(--surface-2, #eee8e5) 65%);
  background-size: 220% 100%;
  animation: image-shimmer 1.6s ease-in-out infinite;
  filter: blur(10px);
  opacity: .35;
  transition: filter .65s ease, opacity .65s ease;
}
.image-resolved { filter: blur(0); opacity: 1; animation: none; }
.image-unavailable { filter: none; opacity: 1; animation: none; }
@keyframes image-shimmer { to { background-position: -220% 0; } }

.data-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.data-loading--active { opacity: 1; visibility: visible; }
.data-loading__line {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: data-progress 1.2s ease-in-out infinite;
}
.data-loading__label {
  display: block;
  width: max-content;
  max-width: 90%;
  margin: calc(env(safe-area-inset-top, 0px) + 5px) auto 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: 0 2px 12px #120f0d18;
  font-size: 11px;
}
@keyframes data-progress { from { background-position: -80% 0; } to { background-position: 180% 0; } }
@media (prefers-reduced-motion: reduce) {
  .image-resolving { filter: none; opacity: 1; animation: none; transition: none; }
  .data-loading, .data-loading__line { animation: none; transition: none; }
  .data-loading__line { background: var(--primary); }
}

/* ── Shared bottom-sheet grabber ── */
.sheet-drag-handle {
  width: 38px;
  height: 4px;
  margin: 6px auto 14px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  touch-action: none;
  cursor: grab;
}
.sheet-drag-handle::before {
  content: '';
  position: absolute;
  inset: -12px -52px;
}

/* ── Package upsell on Book Now ── */
.pkg-upsell { padding: 2px 0 0; }
.pkg-upsell__eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--success-600);
}
.pkg-upsell__title {
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.14;
  letter-spacing: -.3px;
  color: var(--text);
}
.pkg-upsell__body {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.pkg-upsell__compare {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--success-border);
  border-radius: 13px;
  background: var(--success-surface);
}
.pkg-upsell__compare > div:not(.pkg-upsell__arrow):not(.pkg-upsell__save) {
  min-width: 0;
  flex: 1;
}
.pkg-upsell__compare span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pkg-upsell__compare strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pkg-upsell__arrow {
  align-self: center;
  color: var(--success-600);
  font-size: 18px;
  font-weight: 800;
}
.pkg-upsell__save {
  align-self: center;
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--success-500);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pkg-upsell__includes {
  margin-top: 9px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-3);
}
.pkg-upsell__accept { width: 100%; margin-top: 16px; }
.pkg-upsell__skip {
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-3);
  cursor: pointer;
}
.pkg-upsell__progress {
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}
.pkg-upsell__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transform-origin: left;
  animation: pkgUpsellProgress 9s linear forwards;
}
.pkg-upsell:hover .pkg-upsell__progress span { animation-play-state: paused; }
@keyframes pkgUpsellProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pkg-upsell__progress span { animation: none; }
}

/* ── Glazz bottom-sheet modal (permission + city prompts) ── */
.glazz-modal {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s ease;
}
.glazz-modal--open { opacity: 1; }
.glazz-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 13, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.glazz-modal__sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 50px rgba(18, 15, 13, .3);
  transform: translateY(18px);
  transition: transform .2s ease;
}
.glazz-modal--open .glazz-modal__sheet { transform: translateY(0); }
.glazz-modal__grabber {
  width: 38px;
  height: 4px;
  margin: -8px auto 14px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  touch-action: none;
  cursor: grab;
}
.glazz-modal__grabber::before {
  content: '';
  position: absolute;
  inset: -12px -52px;
}
.glazz-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.glazz-modal__title {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -.02em;
  padding-right: 30px;
}
.glazz-modal__body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 8px 0 16px;
}
.glazz-modal__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.glazz-modal__actions .btn {
  flex: 1 1 auto;
  min-height: 44px;
}
.glazz-modal__cities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.glazz-modal__cities .pill { min-height: 40px; }
.glazz-modal__note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
  margin-top: 10px;
}
@media (min-width: 560px) {
  .glazz-modal { align-items: center; }
  .glazz-modal__sheet { border-radius: 20px; padding-bottom: 20px; }
  .glazz-modal__grabber { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .glazz-modal, .glazz-modal__sheet { transition: none; }
  .glazz-modal__sheet { transform: none; }
}

/* ── Owner-editable service/package page sections ── */
.sd-page-section { padding: 18px 20px 14px; }
.sd-page-section--bordered { border-top: 1px solid var(--border-subtle); }
.sd-page-text { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.sd-page-includes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.sd-page-include { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.sd-page-include__check {
  width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--success-surface);
}
.sd-page-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd-page-gallery__item { aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.sd-page-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-page-hygiene { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.sd-page-hygiene img { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 10px; object-fit: cover; }
.sd-page-eyebrow--success { display: flex; align-items: center; gap: 5px; color: var(--success-600); }

/* ── Video-first service/package detail ── */
.sd-video-overlay {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #0b0a0c; color: #fff;
}
.sd-video-top {
  width: min(100%, 420px); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.sd-video-salon { font-size: 14px; font-weight: 700; color: #fff; }
.sd-video-kicker { margin-top: 2px; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.sd-video-close {
  width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; cursor: pointer;
}
.sd-video-stage {
  position: relative;
  width: auto;
  height: min(62vh, 620px);
  max-height: calc(100dvh - 210px);
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 32px);
  border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8);
}
.sd-video-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-video-play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px;
  border: 0; border-radius: 50%; background: rgba(18,15,13,.5); color: #fff;
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px);
}
.sd-video-actions { width: min(100%, 420px); display: flex; gap: 8px; margin-top: 12px; }
.sd-video-btn {
  min-height: 48px; border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 800;
  cursor: pointer; flex: 1; border: 0;
}
.sd-video-btn--primary { background: var(--primary); color: #fff; }
.sd-video-btn--ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; flex: 0 0 42%; }
.sd-video-caption { width: min(100%, 420px); margin-top: 10px; text-align: center; font-size: 11px; color: rgba(255,255,255,.55); }
@media (max-height: 620px) {
  .sd-video-stage { height: 52vh; }
  .sd-video-actions { margin-top: 8px; }
}
