/* Offer pop-up (includes/offer-popup.php). Plain CSS, not part of the Parcel build. */

.offer-popup[hidden] { display: none !important; }

.offer-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* above the header, the chat bubble and the cookie banner */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.offer-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 6, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.offer-popup__card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 40px 36px 28px;
  border-radius: 20px;
  border-top: 8px solid #FEC100;
  background: #001B38;
  color: #fff;
  text-align: center;
  font-family: "Albert Sans", Arial, sans-serif;
  box-shadow: 0 20px 60px rgba(9, 8, 6, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.offer-popup.is-open .offer-popup__backdrop { opacity: 1; }
.offer-popup.is-open .offer-popup__card { opacity: 1; transform: none; }
.offer-popup__card:focus { outline: none; }

.offer-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.offer-popup__close:hover,
.offer-popup__close:focus-visible { background: rgba(255, 255, 255, 0.12); }

.offer-popup__logo { margin: 0 auto 14px; }

.offer-popup__logo img {
  display: block;
  width: auto;
  max-width: 220px;
  height: auto;
  max-height: 72px;
  margin: 0 auto;
}

.offer-popup__eyebrow {
  margin: 0 0 6px;
  color: #FEC100;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offer-popup__title {
  margin: 0 0 12px;
  color: #fff;
  font-family: Bungee, "Albert Sans", Arial, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}

.offer-popup__text {
  margin: 0 0 24px;
  color: #fff;
  font-size: 17px;
  line-height: 1.5;
}

.offer-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 32px 10px;
  border-radius: 20px;
  background: #FEC100;
  color: #001B38;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.offer-popup__button:hover,
.offer-popup__button:focus-visible {
  background: #FFDE76;
  color: #001B38;
  text-decoration: none;
}

.offer-popup__button:focus-visible,
.offer-popup__dismiss:focus-visible,
.offer-popup__close:focus-visible {
  outline: 3px solid #0098EC;
  outline-offset: 3px;
}

.offer-popup__dismiss {
  display: block;
  min-height: 44px;
  margin: 10px auto 0;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: #0098EC;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}

/* Phones: a card that slides up from the bottom instead of a full-screen
   pop-up (Google treats full-screen mobile pop-ups as intrusive). */
@media (max-width: 639px) {
  .offer-popup {
    inset: auto 0 0 0;
    align-items: flex-end;
    padding: 0 8px 8px;
  }

  .offer-popup__backdrop { display: none; }

  .offer-popup__card {
    max-height: 70vh;
    padding: 24px 20px 12px;
    border-radius: 18px;
    transform: translateY(110%);
  }

  .offer-popup__logo { margin-bottom: 8px; }
  .offer-popup__logo img { max-height: 48px; max-width: 160px; }
  .offer-popup__title { font-size: 22px; margin-right: 24px; margin-left: 24px; }
  .offer-popup__text { font-size: 16px; margin-bottom: 16px; }
  .offer-popup__button { width: 100%; box-sizing: border-box; font-size: 18px; }
  .offer-popup__dismiss { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .offer-popup__backdrop,
  .offer-popup__card { transition: none; }
}
