/* Core Web Vitals safeguards shared by the Novin reservation stages. */

.salon-background-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prevent media from expanding a card after it has loaded. */
.yd_salon_images,
.yd-item-img-cont,
.yd_salon_image {
  overflow: hidden;
}

/* Do not apply content-visibility to variable-height salon/service cards.
   A guessed intrinsic height caused a large shift when Chrome replaced the
   placeholder with the card's real height. Stable media boxes provide the
   safe rendering win here. */
.yd_salons,
.update_INPUTS,
.yd_salon,
.ydm_cat_content {
  content-visibility: visible !important;
  contain: none !important;
  contain-intrinsic-size: none !important;
  contain-intrinsic-block-size: none !important;
}

/* Keep the search fields in normal flow while they stick. The old JS toggled
   position:fixed, removed this block from flow, and shifted the full grid. */
.view-reserve .yd_head_fields {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0;
  z-index: 900;
  width: 100%;
  background: #fff;
}

.view-reserve .yd_head_fields.header_fixed_st {
  position: sticky !important;
  right: auto !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

/* Reserve the final mobile header geometry in the first paint. The hamburger
   lives inside #sp-header, so the header must remain visible and interactive. */
@media (max-width: 767px) {
  body.view-reserve #sp-header {
    display: block !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.view-reserve #sp-page-title {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yd_salon *,
  .ydm_cat_content * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
