/* popup.css: the promotional popup.
 *
 * Loaded only on the pages that actually carry the popup, which the header
 * works out before it writes the head, so a site with the popup switched off
 * does not ask for this file at all.
 *
 * Nothing here is shared with the rest of the site: every class is prefixed
 * vh-popup-, so a change made for a promotion cannot reach a page's own design.
 */

.vh-popup {
  position: fixed;
  inset: 0;
  z-index: 1080;            /* above the sticky header, below nothing else */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 20, 54, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s ease;
}

/* [hidden] is how the popup arrives and how it leaves. Giving it a display of
   its own is necessary because the rule above would otherwise override it. */
.vh-popup[hidden] {
  display: none;
}

.vh-popup.is-open {
  opacity: 1;
}

.vh-popup-sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(9, 20, 54, .38);
  transform: translateY(14px) scale(.97);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}

.vh-popup.is-open .vh-popup-sheet {
  transform: none;
}

/* The close control sits over the picture, so it carries its own backing
   rather than relying on whatever colour happens to be underneath it. */
.vh-popup-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: .9rem;
  color: #1e293b;
  background: rgba(255, 255, 255, .92);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(9, 20, 54, .18);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.vh-popup-x:hover,
.vh-popup-x:focus-visible {
  color: #fff;
  background: #9f1239;
}

/* ---- the banner layout ---------------------------------------------------
 *
 * The artwork is the popup. It gets a wider sheet than the card layout, since
 * a 3:2 creative at card width would be too small to read, and the sheet is
 * sized by the picture rather than the other way round.
 */

.vh-popup-is-banner .vh-popup-sheet {
  max-width: 660px;
  overflow: hidden;
}

.vh-popup-banner {
  display: block;
  line-height: 0;               /* no descender gap under the picture */
}

.vh-popup-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px 20px 0 0;
}

.vh-popup-foot {
  padding: 18px 22px 20px;
}

/* The heading the dialog is named by. Read out, never seen: the artwork above
   says the same thing to everybody looking at it. */
.vh-popup-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* ---- the card layout ----------------------------------------------------- */

.vh-popup-art {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.vh-popup-art img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

/* A wash over the picture, so the festive colour carries through whatever
   photograph a later promotion puts there. */
.vh-popup-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(131, 24, 67, .52), rgba(157, 23, 77, .26) 55%, rgba(62, 10, 35, .62));
}

.vh-popup-body {
  padding: 26px 26px 24px;
  text-align: center;
}

.vh-popup-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 14px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9f1239;
  background: #fff1f2;
  border-radius: 999px;
}

.vh-popup-title {
  margin: 0 0 10px;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}

.vh-popup-text {
  margin: 0 0 18px;
  font-size: .95rem;
  line-height: 1.7;
  color: #64748b;
}

.vh-popup-points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  text-align: left;
  border-top: 1px solid #f1f5f9;
}

.vh-popup-points li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid #f1f5f9;
}

.vh-popup-point-label {
  font-size: .9rem;
  color: #475569;
}

.vh-popup-point-value {
  font-size: 1.02rem;
  font-weight: 800;
  color: #9f1239;
  white-space: nowrap;
}

.vh-popup-cta {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #9f1239, #be123c);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(159, 18, 57, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}

.vh-popup-cta:hover,
.vh-popup-cta:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(159, 18, 57, .38);
}

.vh-popup-later {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 6px;
  font-size: .85rem;
  color: #94a3b8;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}

.vh-popup-later:hover,
.vh-popup-later:focus-visible {
  color: #475569;
  text-decoration: underline;
}

/* A phone has the popup sit at the bottom, within reach of a thumb, and the
   picture comes down so the heading and the button both fit without scrolling. */
@media (max-width: 575.98px) {
  .vh-popup {
    align-items: flex-end;
    padding: 0;
  }

  .vh-popup-sheet {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .vh-popup-art {
    border-radius: 20px 20px 0 0;
  }

  .vh-popup-art img {
    height: 124px;
  }

  .vh-popup-body {
    padding: 22px 20px 26px;
  }

  .vh-popup-title {
    font-size: 1.24rem;
  }
}

/* Someone who has asked for less movement gets the popup without any. */
@media (prefers-reduced-motion: reduce) {
  .vh-popup,
  .vh-popup-sheet,
  .vh-popup-cta {
    transition: none;
  }

  .vh-popup-sheet {
    transform: none;
  }
}
