/*
 * Offer popup (inc/offer-popup.php, assets/js/offer-popup.js).
 *
 * Desktop: a centred two-panel dialog, the offer artwork on the left and the
 * form on the right. Phones (767px and below): a bottom sheet, the artwork as
 * a band above the form, scrolling inside the sheet.
 *
 * Layering follows the site's ladder: popups sit at 9999, under the navbar
 * (10000) and the click-to-call dialog (99999). The dialog keeps clear of the
 * navbar through --spcfz-offer-top, which the script sets from the header.
 *
 * Everything starts from #spcfz-offer so nothing leaks into the page, and so
 * the form rules outrank Gravity Forms' Orbital selectors.
 */

@font-face {
  font-family: "SPC Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
}

#spcfz-offer {
  --o-ink: #071329;
  --o-blue: #004dff;
  --o-blue-2: #102ea2;
  --o-body: #3f4b63;
  --o-muted: #53617c;
  --o-line: #dfe7f4;
  --o-sand: #f3ead4;
  --o-font: "SPC Archivo", Arial, sans-serif;
  --o-ease: cubic-bezier(.2, .8, .2, 1);

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--spcfz-offer-top, 0px) + 16px) 16px 16px;
  font-family: var(--o-font);
  -webkit-font-smoothing: antialiased
}

#spcfz-offer[hidden] {
  display: none !important
}

#spcfz-offer *,
#spcfz-offer *::before,
#spcfz-offer *::after {
  box-sizing: border-box
}

html.spcfz-offer-open,
html.spcfz-offer-open body {
  overflow: hidden !important
}

#spcfz-offer .spcfz-offer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 41, .55);
  opacity: 0;
  transition: opacity .25s ease
}

#spcfz-offer .spcfz-offer__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1000px, 100%);
  max-height: 100%;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(7, 19, 41, .35);
  outline: none;
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .3s var(--o-ease), transform .3s var(--o-ease)
}

#spcfz-offer .spcfz-offer__body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  border-radius: inherit;
  overflow: hidden
}

#spcfz-offer.is-open .spcfz-offer__backdrop {
  opacity: 1
}

#spcfz-offer.is-open .spcfz-offer__dialog {
  opacity: 1;
  transform: none
}

/* Close ---------------------------------------------------------------- */

#spcfz-offer .spcfz-offer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f4fa;
  color: var(--o-ink);
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease
}

#spcfz-offer .spcfz-offer__close:hover {
  background: var(--o-ink);
  color: #fff
}

#spcfz-offer .spcfz-offer__close:focus-visible {
  outline: 3px solid rgba(0, 77, 255, .45);
  outline-offset: 2px
}

/* Artwork: the approved creative, rebuilt over its background ------------ */

#spcfz-offer .spcfz-offer__art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 520px;
  padding: 28px 30px;
  background: var(--o-sand) url("../img/offer-popup/eid-al-etihad-bg.jpg") no-repeat right bottom / cover;
  color: var(--o-ink);
  text-align: center
}

#spcfz-offer .spcfz-offer__marks {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%
}

#spcfz-offer .spcfz-offer__logo {
  display: block;
  width: 136px;
  max-width: 40%;
  height: auto
}

#spcfz-offer .spcfz-offer__badge {
  display: block;
  width: 146px;
  max-width: 42%;
  height: auto
}

/* The blue strip above the headline, as in the creative. */
#spcfz-offer .spcfz-offer__tag {
  display: inline-block;
  margin: 24px 0 0;
  padding: 6px 14px 7px;
  background: var(--o-blue);
  color: #fff;
  font-family: var(--o-font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.2;
  text-transform: none
}

#spcfz-offer .spcfz-offer__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 14px 0 0;
  padding: 0;
  color: var(--o-ink);
  font-family: var(--o-font);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.02;
  text-transform: none
}

#spcfz-offer .spcfz-offer__lead {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.25
}

#spcfz-offer .spcfz-offer__accent,
#spcfz-offer .spcfz-offer__strong {
  font-size: 40px;
  font-weight: 800
}

#spcfz-offer .spcfz-offer__accent {
  color: var(--o-blue)
}

#spcfz-offer .spcfz-offer__price {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 6px 20px 7px;
  border: 2px solid var(--o-blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, .35);
  color: var(--o-blue);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  white-space: nowrap
}

#spcfz-offer .spcfz-offer__price .dirham-symbol {
  font-weight: 400
}

/* Form panel ------------------------------------------------------------ */

#spcfz-offer .spcfz-offer__form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 34px 32px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch
}

#spcfz-offer .spcfz-offer__form-title {
  margin: 0 48px 4px 0;
  padding: 0;
  color: var(--o-ink);
  font-family: var(--o-font);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2
}

#spcfz-offer .spcfz-offer__form-text {
  margin: 0 0 18px;
  padding: 0;
  color: var(--o-muted);
  font-family: var(--o-font);
  font-size: 15px;
  line-height: 1.5
}

/* Gravity Forms, in the channel-partner page's field styles ------------- */

#spcfz-offer .gform_wrapper.gform-theme,
#spcfz-offer .gform_wrapper {
  margin: 0;
  font-family: var(--o-font)
}

#spcfz-offer .gform_heading,
#spcfz-offer .gform_required_legend,
#spcfz-offer .gfield_visibility_hidden,
#spcfz-offer .gform_validation_container {
  display: none !important
}

#spcfz-offer .gform_wrapper.gform-theme .gform_fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px
}

#spcfz-offer .gform_wrapper.gform-theme .gfield {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0
}

/* Labels stay for screen readers; the fields carry placeholders. */
#spcfz-offer .gform_wrapper.gform-theme .gfield:not(.gfield--type-consent) > .gfield_label,
#spcfz-offer .gform_wrapper.gform-theme .gfield:not(.gfield--type-consent) > .gform-field-label,
#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent > legend.gfield_label,
#spcfz-offer .gfield_required {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0
}

#spcfz-offer .gform_wrapper.gform-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]),
#spcfz-offer .gform_wrapper.gform-theme textarea {
  display: block;
  width: 100%;
  height: 46px;
  min-height: 0;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--o-line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--o-body);
  font-family: var(--o-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  box-shadow: none;
  outline: none
}

#spcfz-offer .gform_wrapper.gform-theme textarea {
  height: 72px;
  min-height: 72px;
  padding: 10px 14px;
  line-height: 1.45;
  resize: none
}

#spcfz-offer .gform_wrapper.gform-theme input::placeholder,
#spcfz-offer .gform_wrapper.gform-theme textarea::placeholder {
  color: #7a869c;
  opacity: 1
}

#spcfz-offer .gform_wrapper.gform-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
#spcfz-offer .gform_wrapper.gform-theme textarea:focus {
  border-color: var(--o-blue);
  box-shadow: 0 0 0 3px rgba(0, 77, 255, .15);
  outline: none
}

/* Phone: GP Advanced Phone Field (intl-tel-input). */
#spcfz-offer .ginput_container_phone .iti {
  display: block;
  width: 100%
}

#spcfz-offer .ginput_container_phone .iti__country-container {
  inset-inline-start: 0;
  inset-inline-end: auto;
  z-index: 3;
  padding: 0
}

#spcfz-offer .ginput_container_phone .iti__selected-country {
  height: 46px;
  margin: 0;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: transparent;
  color: var(--o-body);
  font-family: var(--o-font);
  font-size: 14px;
  cursor: pointer
}

#spcfz-offer .ginput_container_phone .iti__selected-country-primary {
  position: relative;
  padding-inline-end: 10px
}

#spcfz-offer .ginput_container_phone .iti__selected-country-primary::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  height: 26px;
  margin-top: -13px;
  border-inline-end: 1px solid var(--o-line)
}

#spcfz-offer .ginput_container_phone .iti__selected-dial-code {
  margin-inline-start: 6px;
  color: var(--o-body);
  font-size: 14px
}

#spcfz-offer .gform_wrapper.gform-theme .ginput_container_phone .iti--allow-dropdown input.iti__tel-input {
  direction: ltr;
  padding-left: 84px !important
}

#spcfz-offer .iti__dropdown-content {
  z-index: 1000;
  border: 1px solid var(--o-line);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(7, 19, 41, .14);
  overflow: hidden;
  font-family: var(--o-font);
  font-size: 14px
}

#spcfz-offer .iti__country-list {
  max-height: 200px
}

/* Consent */
#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent .ginput_container_consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0
}

#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent input[type="checkbox"] {
  -webkit-appearance: auto;
  appearance: auto;
  flex: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--o-blue);
  cursor: pointer
}

#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent input[type="checkbox"]::before {
  content: none
}

#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent .gfield_consent_label {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--o-muted);
  font-family: var(--o-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: start;
  cursor: pointer
}

#spcfz-offer .gform_wrapper.gform-theme .gfield--type-consent .gfield_consent_label a {
  color: var(--o-blue);
  text-decoration: underline
}

/* Validation */
#spcfz-offer .gform_wrapper.gform-theme .gfield_error input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
#spcfz-offer .gform_wrapper.gform-theme .gfield_error textarea {
  border-color: #c23b2f
}

#spcfz-offer .gform_wrapper.gform-theme .gfield_validation_message,
#spcfz-offer .gform_wrapper.gform-theme .validation_message {
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #c23b2f;
  font-family: var(--o-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4
}

#spcfz-offer .gform_wrapper.gform-theme .gform_validation_errors {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(194, 59, 47, .25);
  border-radius: 8px;
  background: #fff6f5;
  box-shadow: none
}

#spcfz-offer .gform_wrapper.gform-theme .gform_validation_errors .gform_submission_error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #9a2a20;
  font-family: var(--o-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45
}

#spcfz-offer .gform_wrapper.gform-theme .gform_validation_errors .gform_submission_error .gform-icon {
  position: static;
  flex: none;
  margin: 0
}

#spcfz-offer .gform_confirmation_message {
  padding: 18px 0;
  color: var(--o-ink);
  font-family: var(--o-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5
}

/* Submit */
#spcfz-offer .gform_wrapper.gform-theme .gform_footer {
  display: block;
  margin: 14px 0 0;
  padding: 0
}

#spcfz-offer .gform_wrapper.gform-theme .gform_footer input[type="submit"],
#spcfz-offer .gform_wrapper.gform-theme .gform_footer button[type="submit"],
#spcfz-offer .gform_wrapper.gform-theme .gform_button {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  min-height: 0;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--o-blue);
  color: #fff;
  font-family: var(--o-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .15s ease
}

#spcfz-offer .gform_wrapper.gform-theme .gform_footer input[type="submit"]:hover,
#spcfz-offer .gform_wrapper.gform-theme .gform_button:hover {
  background: var(--o-blue-2);
  color: #fff
}

#spcfz-offer .gform_wrapper.gform-theme .gform_footer input[type="submit"]:focus-visible,
#spcfz-offer .gform_wrapper.gform-theme .gform_button:focus-visible {
  outline: 3px solid rgba(0, 77, 255, .45);
  outline-offset: 2px
}

#spcfz-offer .gform_ajax_spinner {
  margin-left: 10px
}

/* Short laptop screens: a tighter artwork ------------------------------- */

@media (min-width: 768px) and (max-height: 700px) {
  #spcfz-offer .spcfz-offer__art {
    min-height: 0
  }

  #spcfz-offer .spcfz-offer__tag {
    margin-top: 16px
  }

  #spcfz-offer .spcfz-offer__title {
    margin-top: 10px
  }

  #spcfz-offer .spcfz-offer__accent,
  #spcfz-offer .spcfz-offer__strong {
    font-size: 34px
  }

  #spcfz-offer .spcfz-offer__form {
    justify-content: flex-start;
    padding-top: 26px
  }
}

/* Tablets: smaller type, same layout ------------------------------------ */

@media (min-width: 768px) and (max-width: 960px) {
  #spcfz-offer .spcfz-offer__body {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr)
  }

  #spcfz-offer .spcfz-offer__accent,
  #spcfz-offer .spcfz-offer__strong {
    font-size: 32px
  }

  #spcfz-offer .spcfz-offer__lead {
    font-size: 20px
  }

  #spcfz-offer .spcfz-offer__tag {
    font-size: 15px
  }

  #spcfz-offer .spcfz-offer__price {
    font-size: 26px
  }
}

/* Phones: a bottom sheet ------------------------------------------------ */

@media (max-width: 767px) {
  #spcfz-offer {
    align-items: flex-end;
    padding: calc(var(--spcfz-offer-top, 0px) + 56px) 0 0
  }

  #spcfz-offer .spcfz-offer__dialog {
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: opacity .2s ease, transform .35s var(--o-ease)
  }

  #spcfz-offer .spcfz-offer__body {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0
  }

  /* Over the dimmed page, just above the sheet: clear of the badge. */
  #spcfz-offer .spcfz-offer__close {
    top: -50px;
    right: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(7, 19, 41, .25)
  }

  #spcfz-offer .spcfz-offer__art {
    min-height: 0;
    padding: 18px 16px 104px;
    background-position: right bottom;
    background-size: cover
  }

  #spcfz-offer .spcfz-offer__logo {
    width: 96px
  }

  #spcfz-offer .spcfz-offer__badge {
    width: 102px
  }

  #spcfz-offer .spcfz-offer__tag {
    margin-top: 14px;
    padding: 5px 11px 6px;
    font-size: 14px
  }

  #spcfz-offer .spcfz-offer__title {
    margin-top: 10px
  }

  #spcfz-offer .spcfz-offer__lead {
    font-size: 16px
  }

  #spcfz-offer .spcfz-offer__accent,
  #spcfz-offer .spcfz-offer__strong {
    font-size: 27px
  }

  #spcfz-offer .spcfz-offer__price {
    margin-top: 8px;
    padding: 4px 14px 5px;
    border-radius: 8px;
    font-size: 22px
  }

  #spcfz-offer .spcfz-offer__form {
    display: block;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    overflow: visible
  }

  #spcfz-offer .spcfz-offer__form-title {
    margin-right: 0;
    font-size: 20px
  }

  #spcfz-offer .spcfz-offer__form-text {
    margin-bottom: 14px;
    font-size: 14px
  }

  /* 16px stops iOS zooming into a field. */
  #spcfz-offer .gform_wrapper.gform-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]),
  #spcfz-offer .gform_wrapper.gform-theme textarea {
    font-size: 16px
  }
}

@media (max-width: 360px) {
  #spcfz-offer .spcfz-offer__accent,
  #spcfz-offer .spcfz-offer__strong {
    font-size: 24px
  }
}

/* Motion off on request ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #spcfz-offer .spcfz-offer__backdrop,
  #spcfz-offer .spcfz-offer__dialog {
    transition: none
  }
}
