/* 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;
}

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

.price-display span {
  font-weight: 300;
}

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

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

.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: var(--text-caption);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--muted);
  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(--duration-medium) var(--ease-spring),
              opacity var(--duration-normal) ease;
  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);
  border-radius: 50px;
  font-size: var(--text-caption);
  font-family: var(--font-sans);
  font-weight: 400;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

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

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

.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(--paper) #F8F8F8 */
  background: linear-gradient(
    180deg,
    rgba(248, 248, 248, 0) 0%,
    rgba(248, 248, 248, 0.92) 35%,
    var(--paper) 70%
  );
}

.submit-btn {
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  @keyframes gift-reveal-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .state-message {
    animation: gift-reveal-up 0.6s var(--ease-reveal) both;
  }
}

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

.state-message p {
  color: var(--muted);
  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: clamp(2rem, 3.4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 0.98;
  }

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

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

  .gift-point {
    padding: 18px 20px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
  }

  .gift-point-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--text-eyebrow);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .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(--white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
  }
}

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

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