/* The campaign dialog is loaded only by the hair-transplant center. */
html.hair-offer-open {
  overflow: hidden;
  scroll-behavior: auto;
  overscroll-behavior: none;
}

.hair-offer {
  --offer-height: 100vh;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 40px 24px;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #33352d;
  outline: none;
  overscroll-behavior: contain;
}

@supports (height: 100dvh) {
  .hair-offer { --offer-height: 100dvh; }
}

.hair-offer:not([open]) { display: none; }
.hair-offer[open] { display: grid; place-items: center; }

.hair-offer::backdrop {
  background: rgb(17 21 17 / 0%);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background-color 600ms ease, backdrop-filter 600ms ease;
}

.hair-offer.is-visible::backdrop {
  background: rgb(17 21 17 / 62%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hair-offer__card {
  position: relative;
  width: min(440px, calc(100vw - 64px), calc((var(--offer-height) - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 0.6666667));
  padding: 6px;
  border: 1px solid rgb(196 171 130 / 70%);
  border-radius: 5px;
  background: #f5f0e8;
  box-shadow: 0 24px 90px rgb(0 0 0 / 30%), 0 0 0 5px rgb(244 237 224 / 5%);
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px) scale(.98);
  transition: opacity 600ms ease, filter 600ms ease, transform 600ms cubic-bezier(.2,.7,.2,1);
}

.hair-offer.is-visible .hair-offer__card {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.hair-offer.is-closing .hair-offer__card {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(5px) scale(.985);
  pointer-events: none;
}

.hair-offer__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  object-fit: contain;
}

.hair-offer__close {
  position: absolute;
  top: -20px;
  right: -20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c5b18c;
  border-radius: 50%;
  background: #f5f0e8;
  color: #4d503e;
  box-shadow: 0 4px 18px rgb(0 0 0 / 16%);
  transition: background-color 180ms ease, color 180ms ease;
}

.hair-offer__close:hover { background: #dfcfb1; color: #1f281e; }
.hair-offer__close:focus-visible { outline: 2px solid #e7cf9a; outline-offset: 4px; }
.hair-offer__close svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hair-offer::backdrop, .hair-offer__card, .hair-offer__close { transition: none; }
  .hair-offer__card, .hair-offer.is-closing .hair-offer__card { filter: none; transform: none; }
}

@media print { .hair-offer, .hair-offer::backdrop { display: none !important; } }
