/* htgiftcard: name field under the card (personalise.js; design: prototype/personalise variant B) */

/* hover zoom: the stage takes the pointer (popup.css has it off); scale composes with the tilt */
.htgc-overlay.htgc-p .htgc-stage { pointer-events: auto; cursor: text; }
.htgc-overlay.htgc-p .htgc-tilt {
  scale: 1;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), scale .55s cubic-bezier(.16, 1, .3, 1);
}
@media (hover: hover) {
  .htgc-overlay.htgc-p .htgc-stage:hover .htgc-tilt { scale: 1.05; }
}
.htgc-overlay.htgc-p.htgc-reduced .htgc-stage:hover .htgc-tilt { scale: 1; }
@media (prefers-reduced-motion: reduce) {
  .htgc-overlay.htgc-p .htgc-stage:hover .htgc-tilt { scale: 1; }
}

/* the card's name slot */
.htgc-overlay.htgc-p .htgc-p-caret { opacity: 0; }
.htgc-overlay.htgc-p .htgc-p-caret.is-on { opacity: 1; animation: htgc-p-blink 1.05s steps(1, end) infinite; }
.htgc-overlay.htgc-p .htgc-p-caret.is-solid { animation: none; opacity: 1; }
@keyframes htgc-p-blink { 0% { opacity: 1; } 50% { opacity: 0; } }
.htgc-overlay.htgc-p .htgc-p-slot { opacity: 0; transition: opacity .45s ease; }

/* field (theme-proof: reset what a shop theme sets on label/input) */
.htgc-overlay.htgc-p .htgc-stage { margin-bottom: 28px; }
.htgc-overlay.htgc-p .htgc-p-field { position: relative; max-width: 300px; margin: 0 auto 26px; text-align: center; }
.htgc-overlay.htgc-p .htgc-p-label {
  display: block;
  margin: 0 0 4px;
  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;
}
.htgc-overlay.htgc-p .htgc-p-wrap { position: relative; display: block; }
.htgc-overlay.htgc-p .htgc-p-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid rgba(217, 192, 142, .38);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--htgc-ivory);
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 46px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  outline: none;
}
.htgc-overlay.htgc-p .htgc-p-input::placeholder {
  color: rgba(244, 241, 230, .42);
  font-size: 15px;
  font-weight: 300;
  opacity: 1;
  text-transform: none;
  letter-spacing: .01em;
}
/* long names: smaller and tighter so the whole name stays visible in the field */
.htgc-overlay.htgc-p .htgc-p-input.is-long { font-size: 15px; letter-spacing: .06em; }
.htgc-overlay.htgc-p .htgc-p-input.is-xlong { font-size: 13.5px; letter-spacing: .03em; }
/* gold line drawn from the centre on focus */
.htgc-overlay.htgc-p .htgc-p-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(217, 192, 142, 0), var(--htgc-gold) 18%, var(--htgc-gold) 82%, rgba(217, 192, 142, 0));
  transform: scaleX(0);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.htgc-overlay.htgc-p .htgc-p-input:focus + .htgc-p-line { transform: scaleX(1); }

/* editing: card faces the visitor and comes forward, the rest steps back */
.htgc-overlay.htgc-p.htgc-p-edit .htgc-stage .htgc-tilt { transform: none !important; scale: 1.04; }
.htgc-overlay.htgc-p.htgc-p-edit .htgc-shadow { opacity: .55; transition: opacity .5s; }
.htgc-overlay.htgc-p.htgc-p-edit .htgc-p-slot { opacity: 1; }
.htgc-overlay.htgc-p .htgc-body > * { transition: opacity .45s ease, transform .9s cubic-bezier(.16, 1, .3, 1); }
.htgc-overlay.htgc-p.htgc-p-edit .htgc-body > :not(.htgc-p-field):not(.htgc-cta):not(.htgc-status) { opacity: .4; }
.htgc-overlay.htgc-p.htgc-p-ready .htgc-body > * { transition-delay: 0s !important; }

/* short viewports (laptops at 768, phones with browser bars): facts row + fine print fold into one line */
.htgc-overlay.htgc-p .htgc-p-compact { display: none; }
@media (max-height: 800px) {
  .htgc-overlay.htgc-p .htgc-facts,
  .htgc-overlay.htgc-p .htgc-fine { display: none; }
  .htgc-overlay.htgc-p .htgc-p-compact {
    display: block; margin: 14px 0 0; padding: 0; color: var(--htgc-ivory-3); font-family: inherit;
    font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .02em; text-align: center;
  }
  .htgc-overlay.htgc-p .htgc-title { margin-bottom: 10px; }
  .htgc-overlay.htgc-p .htgc-text { margin-bottom: 18px; }
}
@media (max-width: 480px) {
  .htgc-overlay.htgc-p .htgc-stage { margin-bottom: 22px; }
  /* flat card is already wider than the tilted one; no zoom, so it clears the close button */
  .htgc-overlay.htgc-p.htgc-p-edit .htgc-stage .htgc-tilt { scale: 1; }
  .htgc-overlay.htgc-p .htgc-p-field { margin-bottom: 22px; }
}
