/*
 * htgiftcard popup. Every selector is scoped under .htgc-overlay, so nothing leaks into the theme
 * and theme rules for h2/p/button/ul are reset locally. z-index sits above the theme (max 10000)
 * and below the consent banner (2147483000). Montserrat is already loaded by ecco_bella.
 */

.htgc-overlay {
  --htgc-ink: #070C1D;
  --htgc-panel: #0D1733;
  --htgc-panel-2: #15224A;
  --htgc-gold: #D9C08E;
  --htgc-gold-soft: rgba(217, 192, 142, .78);
  --htgc-ivory: #F5EEDF;
  --htgc-ivory-2: rgba(245, 238, 223, .74);
  --htgc-ivory-3: rgba(245, 238, 223, .64);
  --htgc-line: rgba(245, 238, 223, .12);
  --htgc-cw: 340px; /* card width */

  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start; /* + margin:auto on the dialog: centred, but scrollable when taller */
  justify-content: center;
  padding: calc(var(--htgc-cw) * .3 + 16px) 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(22, 36, 78, .80), rgba(5, 9, 22, .93) 72%);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  color: var(--htgc-ivory);
  opacity: 0;
  transition: opacity .38s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
}
.htgc-overlay[data-state="open"] { opacity: 1; }
.htgc-overlay[data-state="closing"] { opacity: 0; transition-duration: .28s; pointer-events: none; }

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (min-width: 768px) {
    .htgc-overlay { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  }
}

.htgc-overlay *,
.htgc-overlay *::before,
.htgc-overlay *::after { box-sizing: border-box; }

.htgc-overlay .htgc-streaks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.htgc-overlay .htgc-glow {
  position: fixed;
  left: 50%;
  top: 46%;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(217, 192, 142, .07), rgba(217, 192, 142, 0) 62%);
}

/* ------------------------------------------------------------------ dialog */

.htgc-overlay .htgc-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  padding: 0 36px 28px;
  border: 1px solid rgba(217, 192, 142, .16);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--htgc-panel-2) 0%, var(--htgc-panel) 46%, #0A1229 100%);
  box-shadow: 0 50px 120px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  outline: none;
  transform: translateY(18px);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1), border-color .5s ease;
}
.htgc-overlay[data-state="open"] .htgc-dialog { transform: none; }
/* green panel layer for the botanical card; fades in and out when switching cards */
.htgc-overlay .htgc-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #1A5131 0%, #123E25 46%, #0B2918 100%);
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.htgc-overlay .htgc-body { position: relative; }
/* a few soft twinkles on the panel itself, above the content but never in the way of clicks */
.htgc-overlay .htgc-panel-sparkles {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}

.htgc-overlay .htgc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--htgc-ivory);
  opacity: .8;
  cursor: pointer;
  transition: opacity .2s, background-color .2s;
}
.htgc-overlay .htgc-close:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.htgc-overlay .htgc-close:focus-visible { opacity: 1; outline: 2px solid var(--htgc-gold); outline-offset: 2px; }
.htgc-overlay .htgc-close__icon,
.htgc-overlay .htgc-close__icon::before {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin: -.75px 0 0 -8px;
  background: currentColor;
  transform: rotate(45deg);
}
.htgc-overlay .htgc-close__icon::before { content: ""; margin: 0; left: 0; top: 0; transform: rotate(90deg); }

/* ------------------------------------------------------------------ card */

.htgc-overlay .htgc-stage {
  position: relative;
  width: var(--htgc-cw);
  height: calc(var(--htgc-cw) * .63);
  margin: calc(var(--htgc-cw) * -.3) auto 30px;
  perspective: 1100px;
  pointer-events: none;
}

.htgc-overlay .htgc-shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -14px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  filter: blur(14px);
  animation: htgc-shadow 11s ease-in-out infinite;
}

.htgc-overlay .htgc-tilt,
.htgc-overlay .htgc-arrive,
.htgc-overlay .htgc-yaw,
.htgc-overlay .htgc-pitch,
.htgc-overlay .htgc-flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* pointer / gyro parallax on top of the resting angle */
.htgc-overlay .htgc-tilt {
  --htgc-px: 0;
  --htgc-py: 0;
  transform: rotateX(calc(9deg + var(--htgc-py) * -7deg)) rotateY(calc(-8deg + var(--htgc-px) * 10deg)) rotateZ(-2.5deg);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.htgc-overlay .htgc-arrive { animation: htgc-arrive 1.25s cubic-bezier(.16, 1, .3, 1) both; }
/* yaw, pitch and roll on periods with no common beat, so the motion never visibly repeats */
.htgc-overlay .htgc-yaw { animation: htgc-yaw 11s ease-in-out infinite; }
.htgc-overlay .htgc-pitch { animation: htgc-pitch 17s ease-in-out infinite; }
.htgc-overlay .htgc-card { animation: htgc-roll 23s ease-in-out infinite; }

.htgc-overlay .htgc-card {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--htgc-cw) * .0383); /* 46/1200, same as the PNG */
  overflow: hidden;
  background: #16264F url('../img/card_face.svg') center / 100% 100% no-repeat;
  box-shadow:
    0 0 0 1px rgba(217, 192, 142, .35) inset,
    0 1px 0 rgba(255, 255, 255, .14) inset,
    0 30px 60px -18px rgba(0, 0, 0, .7),
    0 12px 22px -10px rgba(0, 0, 0, .45);
  backface-visibility: hidden;
}

.htgc-overlay .htgc-card__text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  overflow: visible;
}

/* light catching the surface as it turns; synced with the yaw */
.htgc-overlay .htgc-card__sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, .13) 45%,
    rgba(255, 236, 200, .07) 51%,
    rgba(255, 255, 255, 0) 64%);
  background-size: 260% 100%;
  mix-blend-mode: screen;
  animation: htgc-sheen 11s ease-in-out infinite;
}

@keyframes htgc-arrive {
  from { opacity: 0; transform: translate3d(0, 40px, -420px) rotateX(38deg) rotateY(-46deg) rotateZ(8deg); }
  35%  { opacity: 1; }
  to   { opacity: 1; transform: none; }
}
@keyframes htgc-yaw {
  0%, 100% { transform: rotateY(-7deg); }
  50%      { transform: rotateY(7deg); }
}
@keyframes htgc-pitch {
  0%, 100% { transform: rotateX(5deg); }
  50%      { transform: rotateX(-4deg); }
}
@keyframes htgc-roll {
  0%, 100% { transform: rotateZ(-1.2deg); }
  50%      { transform: rotateZ(1.2deg); }
}
@keyframes htgc-sheen {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}
@keyframes htgc-shadow {
  0%, 100% { transform: translateX(-4%) scaleX(.94); opacity: .9; }
  50%      { transform: translateX(4%) scaleX(1); opacity: .75; }
}

/* ------------------------------------------------------------------ copy */

.htgc-overlay .htgc-body > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s ease, transform .9s cubic-bezier(.16, 1, .3, 1);
}
.htgc-overlay[data-state="open"] .htgc-body > * { opacity: 1; transform: none; }
.htgc-overlay[data-state="open"] .htgc-body > :nth-child(1) { transition-delay: .35s; }
.htgc-overlay[data-state="open"] .htgc-body > :nth-child(2) { transition-delay: .42s; }
.htgc-overlay[data-state="open"] .htgc-body > :nth-child(3) { transition-delay: .50s; }
.htgc-overlay[data-state="open"] .htgc-body > :nth-child(4) { transition-delay: .58s; }
.htgc-overlay[data-state="open"] .htgc-body > :nth-child(n+5) { transition-delay: .66s; }

.htgc-overlay .htgc-eyebrow,
.htgc-overlay .htgc-title,
.htgc-overlay .htgc-text,
.htgc-overlay .htgc-fine,
.htgc-overlay .htgc-status,
.htgc-overlay .htgc-facts,
.htgc-overlay .htgc-fact {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  text-transform: none;
  text-align: center;
  letter-spacing: normal;
  list-style: none;
}

.htgc-overlay .htgc-eyebrow {
  margin-bottom: 14px;
  color: var(--htgc-gold);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.htgc-overlay .htgc-title {
  margin-bottom: 14px;
  color: var(--htgc-ivory);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.htgc-overlay .htgc-text {
  max-width: 330px;
  margin: 0 auto 26px;
  color: var(--htgc-ivory-2);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  text-wrap: pretty;
}

.htgc-overlay .htgc-facts {
  display: flex;
  margin-bottom: 26px;
  border-top: 1px solid var(--htgc-line);
  border-bottom: 1px solid var(--htgc-line);
}
.htgc-overlay .htgc-nowrap { white-space: nowrap; }

.htgc-overlay .htgc-fact {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 4px 13px;
}
.htgc-overlay .htgc-fact + .htgc-fact { border-left: 1px solid var(--htgc-line); }
.htgc-overlay .htgc-fact__label {
  display: block;
  margin-bottom: 5px;
  color: var(--htgc-gold-soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.htgc-overlay .htgc-fact__value {
  display: block;
  color: var(--htgc-ivory);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.htgc-overlay .htgc-cta {
  position: relative;
  display: block;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 20px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #F3E9D3;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .6), inset 0 -1px 0 rgba(0, 0, 0, .08);
  color: #0D1734;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 54px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color .25s, transform .25s, box-shadow .25s;
}
.htgc-overlay .htgc-cta:hover { background: #FFF8EA; transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(0, 0, 0, .08); }
.htgc-overlay .htgc-cta:active { transform: none; }
.htgc-overlay .htgc-cta:focus-visible { outline: 2px solid var(--htgc-gold); outline-offset: 3px; }
.htgc-overlay .htgc-cta[disabled] { cursor: progress; opacity: .85; }
.htgc-overlay .htgc-cta__label { position: relative; z-index: 1; }
/* one slow glint across the button after the intro */
.htgc-overlay .htgc-cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  transform: translateX(-100%) skewX(-18deg);
  opacity: 0;
}
.htgc-overlay[data-state="open"] .htgc-cta::after { animation: htgc-glint 1.6s 1.7s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes htgc-glint {
  0%   { opacity: 0; transform: translateX(0) skewX(-18deg); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(520%) skewX(-18deg); }
}

.htgc-overlay .htgc-status {
  min-height: 0;
  color: #F2B8A8;
  font-size: 12.5px;
  line-height: 1.5;
}
.htgc-overlay .htgc-status:not(:empty) { margin-top: 12px; }

.htgc-overlay .htgc-fine {
  margin-top: 14px;
  color: var(--htgc-ivory-3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .02em;
}

/* ------------------------------------------------------------------ small screens */

@media (max-width: 480px) {
  .htgc-overlay { --htgc-cw: min(268px, 76vw); padding-left: 12px; padding-right: 12px; }
  .htgc-overlay .htgc-dialog { padding: 0 22px 22px; border-radius: 20px; }
  .htgc-overlay .htgc-stage { margin-bottom: 24px; }
  .htgc-overlay .htgc-title { font-size: 23px; font-weight: 500; }
  .htgc-overlay .htgc-text { font-size: 13.5px; margin-bottom: 22px; }
  .htgc-overlay .htgc-facts { margin-bottom: 22px; }
  .htgc-overlay .htgc-fact { padding: 12px 2px 11px; }
  .htgc-overlay .htgc-fact__label { font-size: 9.5px; letter-spacing: .12em; }
  .htgc-overlay .htgc-fact__value { font-size: 13px; }
  .htgc-overlay .htgc-cta { height: 52px; line-height: 52px; letter-spacing: .16em; }
  .htgc-overlay .htgc-close { top: 6px; right: 6px; }
}
@media (max-height: 640px) and (min-width: 481px) {
  .htgc-overlay { --htgc-cw: 280px; }
}

/* ------------------------------------------------------------------ reduced motion */

.htgc-overlay.htgc-reduced .htgc-arrive,
.htgc-overlay.htgc-reduced .htgc-yaw,
.htgc-overlay.htgc-reduced .htgc-pitch,
.htgc-overlay.htgc-reduced .htgc-card,
.htgc-overlay.htgc-reduced .htgc-shadow,
.htgc-overlay.htgc-reduced .htgc-card__sheen,
.htgc-overlay.htgc-reduced .htgc-cta::after { animation: none !important; }
.htgc-overlay.htgc-reduced .htgc-dialog,
.htgc-overlay.htgc-reduced .htgc-tilt,
.htgc-overlay.htgc-reduced .htgc-body > * { transition: opacity .3s ease !important; transform: none !important; transition-delay: 0s !important; }
.htgc-overlay.htgc-reduced .htgc-tilt { transform: rotateX(9deg) rotateY(-8deg) rotateZ(-2.5deg) !important; }
.htgc-overlay.htgc-reduced .htgc-card__sheen { background-position: 60% 0; }

@media (prefers-reduced-motion: reduce) {
  .htgc-overlay .htgc-arrive,
  .htgc-overlay .htgc-yaw,
  .htgc-overlay .htgc-pitch,
  .htgc-overlay .htgc-card,
  .htgc-overlay .htgc-shadow,
  .htgc-overlay .htgc-card__sheen,
  .htgc-overlay .htgc-cta::after { animation: none !important; }
}

/* ------------------------------------------------------------------ cards
 * One overlay class per card variant (.htgc-v-midnight = €25, .htgc-v-botanical = €50); popup.js
 * swaps it when the visitor switches value. Midnight colours are the base above.
 */

.htgc-overlay.htgc-v-midnight .htgc-card { background-color: #1C2E5B; background-image: url('../img/card_face_midnight.svg'); }
.htgc-overlay.htgc-v-botanical .htgc-card { background-color: #143F25; background-image: url('../img/card_face_botanical.svg'); }

.htgc-overlay.htgc-v-botanical {
  --htgc-ivory: #F4F1E6;
  --htgc-ivory-2: rgba(244, 241, 230, .76);
  --htgc-ivory-3: rgba(244, 241, 230, .62);
  --htgc-line: rgba(244, 241, 230, .14);
}
.htgc-overlay.htgc-v-botanical .htgc-dialog { border-color: rgba(217, 192, 142, .20); }
.htgc-overlay.htgc-v-botanical .htgc-dialog::before { opacity: 1; }
.htgc-overlay.htgc-v-botanical .htgc-cta { color: #0F3420; }

/* value selector */
.htgc-overlay .htgc-choose { margin: 0 0 22px; }
.htgc-overlay .htgc-choose__label {
  margin: 0 0 10px;
  padding: 0;
  color: var(--htgc-gold-soft);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
}
.htgc-overlay .htgc-choice {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.htgc-overlay .htgc-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 1 150px;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--htgc-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  box-shadow: none;
  color: var(--htgc-ivory);
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color .25s, background-color .25s, box-shadow .25s, color .25s;
}
.htgc-overlay .htgc-option:hover { border-color: rgba(217, 192, 142, .5); }
.htgc-overlay .htgc-option[aria-checked="true"] {
  border-color: rgba(217, 192, 142, .85);
  background: rgba(217, 192, 142, .09);
}
.htgc-overlay .htgc-option:focus-visible { outline: 2px solid var(--htgc-gold); outline-offset: 3px; }
.htgc-overlay .htgc-option[disabled] { cursor: progress; }
/* a tiny card in the card's own colours */
.htgc-overlay .htgc-option__swatch {
  flex: none;
  width: 22px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 2px 6px rgba(0, 0, 0, .35);
}
.htgc-overlay .htgc-option--midnight .htgc-option__swatch { background: linear-gradient(135deg, #2C4280, #0A1330); }
.htgc-overlay .htgc-option--botanical .htgc-option__swatch { background: linear-gradient(135deg, #2A7146, #0A2615); }

@media (max-width: 480px) {
  .htgc-overlay .htgc-choose { margin-bottom: 18px; }
  .htgc-overlay .htgc-option { height: 46px; font-size: 16px; }
}

.htgc-overlay.htgc-reduced .htgc-dialog::before { transition: none; }
