/**
 * Weiss Preorders — front-end styles.
 *
 * Reads the child theme's tokens (--weiss-*, --font-*) and falls back to the
 * Weiss design-guide values. Sizes follow the site's readability floor: body
 * 19px, labels and buttons 15px, nothing people read under ~15px.
 */

.wpo-feature,
.wpo-page,
.wpo-empty {
  --wpo-font-heading: var(--font-heading, 'Libre Caslon Text', Georgia, serif);
  --wpo-font-body:    var(--font-body, 'Work Sans', 'Helvetica Neue', Arial, sans-serif);
  --wpo-burgundy:      var(--weiss-burgundy, #7E1F2A);
  --wpo-burgundy-dark: var(--weiss-burgundy-dark, #5E1420);
  --wpo-accent:        var(--weiss-accent-red, #C8443F);
  --wpo-ink:           var(--weiss-ink, #1E1614);
  --wpo-espresso:      var(--weiss-espresso, #1A0F0D);
  --wpo-cream:         var(--weiss-cream, #F6F0E7);
  --wpo-line:          var(--weiss-line, #DCCFC0);
  --wpo-label:         var(--weiss-on-dark-label, #E8C9C9);
  --wpo-frame-light:   var(--weiss-frame-on-light, #C9B8AE);
  --wpo-text:          var(--color-text, #4A3D38);
  --wpo-side:          var(--weiss-side-pad, clamp(20px, 4vw, 40px));
  --wpo-section:       var(--weiss-section-pad, clamp(64px, 9vw, 120px));

  font-family: var(--wpo-font-body);
  box-sizing: border-box;
}

.wpo-feature *,
.wpo-page * {
  box-sizing: border-box;
}

.wpo-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Eyebrow: wide-tracked caps with a short red rule before it. */
.wpo-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 22px !important;
  font-family: var(--wpo-font-body) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.26em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--wpo-burgundy);
}

.wpo-eyebrow::before {
  content: '';
  flex: 0 0 auto;
  width: 48px;
  height: 2px;
  background: var(--wpo-accent);
}

/* Buttons: square, tracked caps. */
.wpo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 36px;
  font-family: var(--wpo-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wpo-btn--light {
  background: #fff;
  color: var(--wpo-ink) !important;
}

.wpo-btn--light:hover,
.wpo-btn--light:focus-visible {
  background: var(--wpo-burgundy);
  border-color: #fff;
  color: #fff !important;
}

.wpo-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* Photo frames, with an optional "Sold out" stamp. */
.wpo-photo {
  position: relative;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--wpo-frame-light);
}

.wpo-photo--on-dark {
  border-color: rgba(255, 255, 255, 0.35);
}

.wpo-photo__img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.wpo-stamp {
  position: absolute;
  top: 34px;
  right: 34px;
  padding: 12px 22px;
  background: var(--wpo-burgundy);
  color: #fff;
  font-family: var(--wpo-font-heading);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
  transform: rotate(-4deg);
}

.is-sold-out .wpo-photo__img {
  filter: saturate(0.55);
}

/* Short status lines: "Pickup Dec 19 – 23", "Order by …", "Almost gone …" */
.wpo-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 0 32px !important;
  padding: 0 !important;
  list-style: none !important;
}

.wpo-facts__item {
  margin: 0 !important;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wpo-burgundy);
}

.wpo-facts__item--low {
  color: var(--wpo-accent);
}


/* =============================================================================
   [weiss_preorder_feature]: the dark home-page section
   ============================================================================= */

.wpo-feature {
  width: 100%;
  margin: 0 !important;
  padding: var(--wpo-section) var(--wpo-side);
  background: var(--wpo-espresso);
  color: #fff;
}

.wpo-feature + .wpo-feature {
  padding-top: 0;
}

.wpo-feature__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  max-width: 1200px;
  margin: 0 auto;
}

.wpo-feature--flip .wpo-photo {
  order: -1;
}

.wpo-feature .wpo-eyebrow {
  color: var(--wpo-label);
}

.wpo-feature .wpo-feature__title {
  margin: 0 0 28px !important;
  font-family: var(--wpo-font-heading) !important;
  font-size: clamp(2.75rem, 5.6vw, 5.25rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  line-height: 1 !important;
  text-transform: uppercase;
  color: #fff !important;
}

.wpo-feature__teaser {
  max-width: 34em;
  margin-bottom: 28px;
  font-size: 20px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
}

.wpo-feature__teaser p {
  margin: 0 0 0.8em;
}

.wpo-feature__teaser p:last-child {
  margin-bottom: 0;
}

.wpo-feature .wpo-facts__item {
  color: var(--wpo-label);
}

.wpo-feature__action {
  margin: 0 !important;
}

@media (max-width: 900px) {
  .wpo-feature__inner {
    grid-template-columns: 1fr;
  }
  .wpo-feature .wpo-photo {
    order: -1; /* photo first on phones */
  }
}


/* =============================================================================
   [weiss_preorders]: the Preorders page
   ============================================================================= */

/* Its own side padding, so it never touches the screen edge on a phone even
   when the page around it has none. The max-width grows by the padding, so the
   content is still 1200px wide on desktop. */
.wpo-page {
  max-width: calc(1200px + 2 * var(--wpo-side));
  margin-inline: auto;
  padding-inline: var(--wpo-side);
}

.wpo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 7vw, 100px);
  color: var(--wpo-text);
}

.wpo-item + .wpo-item {
  margin-top: var(--wpo-section);
  padding-top: var(--wpo-section);
  border-top: 1px solid var(--wpo-line);
}

.wpo-item .wpo-photo {
  margin-bottom: 44px;
}

.wpo-item .wpo-item__title {
  margin: 0 0 28px !important;
  font-family: var(--wpo-font-heading) !important;
  font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  line-height: 1.02 !important;
  text-transform: uppercase;
  color: var(--wpo-ink);
}

.wpo-item__details {
  margin-bottom: 34px;
  font-size: 19px;
  line-height: 1.7;
}

.wpo-item__details p {
  margin: 0 0 1em;
}

.wpo-item__details p:last-child {
  margin-bottom: 0;
}

/* Pickup times list */
.wpo-times {
  margin-bottom: 30px;
}

.wpo-times__label {
  margin: 0 0 10px !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wpo-ink);
}

.wpo-times__list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  border-top: 1px solid var(--wpo-line);
}

.wpo-times__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 !important;
  padding: 12px 0;
  font-size: 18px;
  color: var(--wpo-ink);
  border-bottom: 1px solid var(--wpo-line);
}

.wpo-times__list li.is-full {
  color: #8a7d76;
  text-decoration: line-through;
}

.wpo-times__tag {
  flex: 0 0 auto;
  padding: 3px 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--wpo-burgundy);
  color: #fff;
  display: inline-block;
}

/* The order card: hairline frame around a white panel. */
/* Sticks just below the theme's fixed header (plus the admin bar when logged
   in), not the top of the window, so the header never covers it. The card
   only sticks once the page has scrolled, and by then the top bar has scrolled
   away, so it's the nav's height alone: the shrunk height when the theme
   shrinks the nav on scroll, the full height otherwise. */
.wpo-card {
  --wpo-sticky-gap: 24px;
  position: sticky;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nav-height, 115px) + var(--wpo-sticky-gap));
  padding: 12px;
  border: 1px solid var(--wpo-line);
}

.nav-anim-shrink.is-scrolled .wpo-card {
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nav-height-shrunk, 70px) + var(--wpo-sticky-gap));
}

.wpo-card__inner {
  padding: clamp(28px, 4.5vw, 60px);
  background: #fff;
}

.wpo-card .wpo-card__title {
  margin: 0 0 36px !important;
  font-family: var(--wpo-font-heading) !important;
  font-size: clamp(2rem, 3.4vw, 2.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  line-height: 1.08 !important;
  text-align: center;
  text-transform: uppercase;
  color: var(--wpo-ink);
}

.wpo-card__text {
  margin: 0 0 1em !important;
  font-size: 19px;
  line-height: 1.65;
  text-align: center;
}

.wpo-card__text a {
  color: var(--wpo-burgundy);
  font-weight: 600;
}

.is-sold-out .wpo-card .wpo-card__title {
  color: var(--wpo-burgundy);
}

/* The ixiun Forms form inside the card, in the Weiss look. */
.wpo-card .ixiun-form {
  --ixf-font: var(--wpo-font-body);
  --ixf-label-font: var(--wpo-font-body);
  --ixf-border: var(--wpo-line);
  --ixf-row-gap: 1.6rem;
  max-width: none;
}

.wpo-card .ixiun-form__label {
  margin-bottom: 0.55rem;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.wpo-card .ixiun-form__field input,
.wpo-card .ixiun-form__field select,
.wpo-card .ixiun-form__field textarea {
  min-height: 60px;
  padding: 14px 18px;
  font-size: 18px;
  border-color: #c9bdb0;
}

.wpo-card .ixiun-form__field textarea {
  min-height: 110px;
}

.wpo-card .ixiun-form__field select {
  padding-right: 2.8rem;
}

/* Pickup times as large, tappable rows. */
.wpo-card .ixiun-form__options {
  gap: 0.6rem;
}

.wpo-card .ixiun-form__option {
  min-height: 58px;
  padding: 12px 16px;
  gap: 14px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--wpo-ink);
  border: 1px solid #c9bdb0;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wpo-card .ixiun-form__option:hover {
  border-color: var(--wpo-burgundy);
}

.wpo-card .ixiun-form__option:has(input:checked) {
  border-color: var(--wpo-burgundy);
  background: #fbf5f3;
  box-shadow: inset 3px 0 0 var(--wpo-burgundy);
}

.wpo-card .ixiun-form__option input {
  flex: 0 0 auto;
  width: 22px !important;
  height: 22px;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
}

.wpo-card .ixiun-form__help,
.wpo-card .ixiun-form__error,
.wpo-card .ixiun-form__summary {
  font-size: 16px;
}

/* Square, solid burgundy button (the default "primary" wipes to its label
   colour, which would be white on white here). */
.wpo-card .ixiun-form__submit--primary {
  min-height: 62px;
  font-family: var(--wpo-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--wpo-burgundy);
  border-color: var(--wpo-burgundy);
  border-radius: 0;
  box-shadow: none;
}

.wpo-card .ixiun-form__submit--primary::before {
  background-color: var(--wpo-burgundy-dark);
}

.wpo-card .ixiun-form__submit--primary:hover {
  color: #fff;
  border-color: var(--wpo-burgundy-dark);
}

/* No sliding arrow (ixiun Forms adds one to solid buttons). */
.wpo-card .ixiun-form__submit--primary::after {
  content: none;
  display: none;
}

.wpo-card .ixiun-form__success {
  font-size: 19px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .wpo-item {
    grid-template-columns: 1fr;
  }
  .wpo-card {
    position: static;
  }
}

/* Phones: thinner frame and padding, so the fields and the button get the
   width (the button stays on one line). */
@media (max-width: 600px) {
  .wpo-card {
    padding: 6px;
  }
  .wpo-card__inner {
    padding: 28px 18px;
  }
  .wpo-card .wpo-card__title {
    margin-bottom: 26px !important;
  }
  .wpo-card .ixiun-form__submit--primary {
    padding-inline: 16px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }
}

/* Nothing live */
.wpo-empty {
  max-width: calc(40em + 2 * var(--wpo-side));
  margin-inline: auto;
  padding: 40px var(--wpo-side);
  text-align: center;
}

.wpo-empty p {
  margin: 0;
  font-size: 20px;
  line-height: 1.65;
  color: var(--wpo-text);
}

.wpo-empty a {
  color: var(--wpo-burgundy);
  font-weight: 600;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .wpo-btn,
  .wpo-card .ixiun-form__option {
    transition: none;
  }
}
