/* monomo gift page
   extracted from inline styles in gift.html */

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* header overrides */
.page-header .tagline {
  margin-bottom: 16px;
}

@media (max-width: 440px) {
  .page-header .tagline {
    /* rebalance the mobile gap — brand.css defaults to 6px top + gift's 16px bottom,
       which leaves the tagline stuck to the h1 and floating above the "antes €85"
       line when the Sant Jordi promo is active */
    margin-top: 12px;
    margin-bottom: 10px;
  }
}

@media (min-width: 441px) {
  .page-header .tagline { font-size: 15px; }
  .page-footer         { font-size: 14px; }
}

.price-display {
  font-size: var(--text-title);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-heading);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-display span {
  font-weight: var(--weight-regular);
}

/* promo-aware header price: the discounted price is the dominant number,
   "was €85" sits small above as an anchor (not as bait). */
.price-display.price-display-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  letter-spacing: 0;
}

.price-display.price-display-promo .promo-was {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-button);
  color: var(--dark-text-secondary);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  line-height: 1;
}

/* ============================================
   sant jordi campaign — scoped under body.is-sj-promo so regular
   gift purchasers never see any of these styles. mirrors the rose-red
   accent + signature mark from the /gift/sant-jordi landing so the
   handoff from QR scan → landing → purchase reads as one flow.
   ============================================ */

body.is-sj-promo {
  --sj-red: #c8302b;
}

body.is-sj-promo .sj-name {
  color: var(--sj-red);
}

body.is-sj-promo .promo-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
  color: var(--sj-red);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* the signature red underline beneath the dominant discounted price,
   matching the landing's offer-band mark. */
body.is-sj-promo .price-display.price-display-promo .promo-now {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--sj-red);
}

.price-display.price-display-promo .promo-now {
  font-size: var(--text-title);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-heading);
  line-height: 1;
  color: var(--dark-text-primary);
}

.price-detail {
  color: var(--dark-text-secondary);
  font-size: 14px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.02em;
  margin-top: 8px;
}

/* form */
.gift-content {
  flex: 1;
  max-width: var(--content-width-narrow);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) max(32px, calc(20px + env(safe-area-inset-bottom)));
  scroll-padding-bottom: 120px;
  background: var(--bg-page);
}

.gift-layout {
  width: 100%;
}

.gift-rail {
  display: none;
}

.input-group {
  margin-bottom: 16px;
}

.input-group .input-label {
  margin-bottom: 4px;
}

.gift-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.01em;
  color: var(--selenium);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.gift-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
  flex-shrink: 0;
  cursor: pointer;
}

.recipient-fields {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition),
              opacity var(--transition);
  opacity: 0;
}

.recipient-fields.open {
  max-height: 320px;
  opacity: 1;
}

.lang-group {
  margin-bottom: 20px;
}

.lang-group .input-label {
  margin-bottom: 4px;
}

.lang-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-pills input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lang-pill {
  padding: 8px 20px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: var(--font);
  font-weight: var(--weight-regular);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lang-pills input:checked + .lang-pill {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  font-weight: var(--weight-semi);
}

.lang-pills input:focus-visible + .lang-pill {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.promo-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-button);
  line-height: 1;
  animation: notice-in var(--transition);
}

.promo-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream);
  flex-shrink: 0;
}

.promo-chip-label {
  flex: 1;
}

.promo-chip-code {
  color: var(--selenium);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-ui);
}

.price-strike {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  color: var(--selenium);
  margin-right: 6px;
}

.submit-wrap {
  position: sticky;
  bottom: max(10px, calc(8px + env(safe-area-inset-bottom)));
  z-index: 8;
  margin-top: 10px;
  padding-top: 16px;
  /* matches var(--bg-page) #FFFFFF */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.92) 35%,
    var(--bg-page) 70%
  );
}

.submit-btn {
  justify-content: space-between;
  font-size: 16px; /* match the Sant Jordi landing hero/offer CTA scale */
}

.error-message {
  color: var(--ink);
  background: var(--bg-surface);
  padding: 14px;
  border-radius: var(--radius-input);
  font-size: var(--text-caption);
  font-weight: var(--weight-regular);
  margin-top: 16px;
  display: none;
  text-align: center;
  border: none;
}

/* success + cancelled states */
.state-message {
  padding: var(--space-lg) 0;
  text-align: center;
}

/* no scroll reveal animation — v1.1 */

.state-message h2 {
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: var(--weight-semi);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.state-message p {
  color: var(--selenium);
  font-size: var(--text-body);
  margin-bottom: 8px;
}

@media (min-width: 960px) {
  .gift-content {
    max-width: 1120px;
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .gift-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 460px);
    justify-content: space-between;
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
  }

  .gift-rail {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 32px;
  }

  .gift-rail h2 {
    font-size: var(--text-h2);
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-heading);
    line-height: 1.0;
  }

  .gift-lead {
    font-size: var(--text-body-lg);
    color: var(--ink);
  }

  .gift-points {
    display: grid;
    gap: 12px;
  }

  .gift-point {
    padding: 18px 20px;
    background: var(--light);
    border-radius: var(--radius-card);
  }

  .gift-point-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px; /* eyebrow tier, matches Sant Jordi landing kicker */
    font-weight: var(--weight-semi);
    letter-spacing: var(--tracking-ui);
    text-transform: uppercase;
    color: var(--selenium);
  }

  .gift-point p {
    color: var(--ink);
    font-size: var(--text-body);
  }

  .gift-panel {
    min-width: 0;
  }

  #state-form,
  .state-message {
    padding: clamp(28px, 3vw, 34px);
    background: var(--light);
    border-radius: var(--radius-card);
  }
}

@media (max-width: 440px) {
  .price-display {
    font-size: 2.75rem;
  }

  .gift-content {
    padding-bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
  }
}

/* ============================================
   redeem hint — sign-post for customers who meant /redeem
   ============================================ */

.gift-redeem-hint {
  margin-top: 20px;
  text-align: center;
  font-size: var(--text-caption);
  color: var(--selenium);
}

.gift-redeem-hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gift-redeem-hint a:hover,
.gift-redeem-hint a:active {
  color: var(--ink);
}

/* ============================================
   promo code input — same visual pattern as /book
   ============================================ */

.code-section {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
}

.code-toggle {
  color: var(--selenium);
  text-decoration: none;
  font-size: var(--text-caption);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  touch-action: manipulation;
  transition: color var(--transition);
}

.code-toggle:hover,
.code-toggle:active {
  color: var(--ink);
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.code-input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
}

.code-apply {
  flex-shrink: 0;
}

.code-status {
  font-size: var(--text-caption);
  margin-top: 6px;
  min-height: 1.2em;
}

.code-valid {
  color: var(--ink);
}

.code-invalid {
  color: var(--selenium);
}

/* ============================================
   retina / HiDPI refinements
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .lang-pill {
    border-width: 0.5px;
  }

  .code-section {
    border-width: 0.5px;
  }
}
