/* ============================================================
   Little Bend — Forms
   Subscribe + Bouquet order forms. Lives separate from
   components.css so the 95% of pages that don't need form
   styles don't pay for them.
   ============================================================ */


/* ── Page header for product / order pages ─────────────── */
.prodhead {
  padding: 40px 0 24px;
  text-align: center;
}
.prodhead__mark {
  display: block;
  /* Quieter scale on the story page — sized at ~50% of the home-page
     .cards__mark so the folk-tulip reads as a small stamp above the
     eyebrow rather than a hero illustration. */
  width: clamp(57px, 6.8vw, 78px);
  height: auto;
  margin: 0 auto 14px;
  opacity: .88;
}
.prodhead .eyebrow { display: inline-block; margin-bottom: 10px; }
.prodhead h1 {
  font-family: var(--serif);
  font-weight: 400;
  /* Sized so the full line — "A small-batch flower farm in Camp
     Dennison, Ohio." — fits on one line from ~880px up. Below that
     the headline wraps naturally. */
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
/* Keep the story headline on a single line at desktop widths. */
@media (min-width: 880px) {
  .prodhead h1 { white-space: nowrap; }
}
.prodhead h1 .hand {
  font-family: var(--hand);
  font-style: normal;
  font-weight: 600;
  color: var(--brick-d);
  font-size: 1.1em;
  padding: 0 2px;
}
.prodhead p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}


/* ── Order layout: form column + sticky summary sidebar ── */
.order {
  padding: 24px 0 96px;
}
.order__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) {
  .order__grid { grid-template-columns: 1fr; gap: 32px; }
  .order__summary { position: static !important; }
}

/* Form column — stacked fieldsets separated by dashed rules */
.order__form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 40px;
}
.order__form legend {
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
  padding: 0 0 14px;
  display: flex; align-items: baseline; gap: 10px;
  width: 100%;
  border-bottom: 1px dashed var(--hair);
  margin-bottom: 22px;
}
.order__form legend .num {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--brick-d);
}

/* Field primitives */
.field { margin: 0 0 16px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--ink);
  background: #FBF7EA;
  border-radius: 4px;
  appearance: none;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--brick);
  outline-offset: 1px;
}
.field .hint {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-2);
  margin: 6px 0 0;
  font-style: italic;
}
.field .err {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--brick-d);
  margin: 6px 0 0;
  min-height: 14px;
}

/* Two-column field row */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }


/* ── Segmented control (package size, method) ─────────── */
.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.segment input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.segment label {
  cursor: pointer;
  border: 1px solid var(--ink);
  background: #FBF7EA;
  padding: 18px 18px 16px;
  display: block;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  border-radius: 6px;
  transition: background var(--dur-mid), color var(--dur-mid),
              transform var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
  position: relative;
}
.segment label .t {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  margin-bottom: 4px;
}
.segment label .t em {
  font-family: var(--hand);
  font-weight: 600;
  color: var(--brick-d);
  font-style: normal;
  font-size: 1.05em;
  padding-right: 3px;
}
.segment label .p {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: .08em;
  color: var(--taupe);
  display: block;
}
.segment label .meta {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}
.segment input[type="radio"]:checked + label {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 3px 4px 0 rgba(28,26,21,.15);
}
.segment input[type="radio"]:checked + label .p,
.segment input[type="radio"]:checked + label .meta { color: rgba(244,239,226,.75); }
.segment input[type="radio"]:checked + label .t em { color: var(--sand); }
.segment input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}
/* Disabled state — used by the subscribe form to gate packages as
   the season winds down (Full Season closes first, then all packages
   when fewer than two Saturdays remain). */
.segment input[type="radio"]:disabled + label,
.segment label.is-disabled {
  cursor: not-allowed;
  opacity: .45;
  background: var(--paper-2);
  color: var(--ink-2);
  transform: none;
  box-shadow: none;
}
.segment input[type="radio"]:disabled + label:hover,
.segment label.is-disabled:hover {
  background: var(--paper-2);
}


/* ── Date grid (pick your Saturdays) ──────────────────── */
.dategrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 640px) { .dategrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .dategrid { grid-template-columns: repeat(2, 1fr); } }

.datetile {
  position: relative;
}
.datetile input[type="checkbox"],
.datetile input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.datetile label {
  cursor: pointer;
  display: block;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--ink);
  background: #FBF7EA;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background var(--dur-fast), color var(--dur-fast);
  text-transform: none;
  letter-spacing: normal;
}
.datetile label .m {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 2px;
}
.datetile label .d {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
.datetile input[type="checkbox"]:checked + label {
  background: var(--brick);
  color: var(--paper);
  border-color: var(--brick);
}
.datetile input[type="checkbox"]:checked + label .m { color: rgba(244,239,226,.8); }
.datetile input[type="checkbox"]:disabled + label {
  opacity: .4;
  cursor: not-allowed;
}
.datetile input[type="checkbox"]:focus-visible + label {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}


/* ── Month calendar (bouquets page) ───────────────────
   One month visible at a time with ← / → nav to flip between
   Jul / Aug / Sep 2026. Thu/Fri/Sat in range are pickable radios;
   all other days render but are muted and non-interactive.
   Selections persist across flips because every month is in the
   DOM — we only toggle visibility. */
.calendar { margin-top: 4px; }

/* Flip nav: prev · month label · next */
.calendar__nav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 14px;
}
.calendar__navbtn {
  appearance: none;
  border: 1px solid var(--ink);
  background: #FBF7EA;
  border-radius: 4px;
  width: 36px; height: 36px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), opacity var(--dur-fast);
}
.calendar__navbtn:hover { background: var(--paper-2); }
.calendar__navbtn[disabled] {
  opacity: .35;
  cursor: not-allowed;
}
.calendar__navbtn:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}
.calendar__navbtn--next { justify-self: end; }

/* Month blocks: only the active one is shown */
.calendar__month { display: none; }
.calendar__month.is-active { display: block; }

.calendar__head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  margin: 0;
  text-align: center;
  color: var(--ink);
  letter-spacing: -.005em;
}
.calendar__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.calendar__dow span {
  text-align: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar__cell {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  border-radius: 4px;
  position: relative;
  user-select: none;
}
.calendar__cell.is-pad { visibility: hidden; }
.calendar__cell.is-disabled {
  color: var(--hair);
  cursor: not-allowed;
  font-family: var(--body);
  font-style: italic;
  font-size: 15px;
}
.calendar__cell.is-pickable {
  cursor: pointer;
  border: 1px solid var(--ink);
  background: #FBF7EA;
  transition: background var(--dur-fast), color var(--dur-fast),
              transform var(--dur-fast), box-shadow var(--dur-fast);
}
.calendar__cell.is-pickable:hover { background: var(--paper-2); }
.calendar__cell.is-pickable input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.calendar__cell.is-pickable:has(input:checked) {
  background: var(--brick);
  color: var(--paper);
  border-color: var(--brick);
  transform: translateY(-1px);
  box-shadow: 2px 3px 0 rgba(28,26,21,.18);
}
.calendar__cell.is-pickable:focus-within {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
}

.calendar__legend {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 18px;
  margin-top: 18px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--taupe);
}
.calendar__legend span { display: inline-flex; align-items: center; gap: 8px; }
.calendar__legend .sw {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: #FBF7EA;
}
.calendar__legend .sw.is-picked {
  background: var(--brick);
  border-color: var(--brick);
}


/* ── Checkbox / toggle for gift, etc. ─────────────────── */
.toggle {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--hair);
  border-radius: 6px;
  cursor: pointer;
}
.toggle input { margin-top: 3px; }
.toggle .lbl {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
}
.toggle .sub {
  display: block;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 2px;
}


/* ── Summary sidebar ──────────────────────────────────── */
.order__summary {
  background: #FBF7EA;
  border: 1px solid var(--ink);
  padding: 24px;
  position: sticky;
  top: 24px;
}
.order__summary h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  letter-spacing: -.005em;
}
.order__summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 10px;
  column-gap: 14px;
}
.order__summary dt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--taupe);
}
.order__summary dd {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  text-align: right;
}
.order__summary .total {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--hair);
  display: flex; justify-content: space-between; align-items: baseline;
}
.order__summary .total .lbl {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
}
.order__summary .total .amt {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}
.order__summary .submit {
  width: 100%;
  margin-top: 20px;
}
.order__summary .note {
  margin-top: 12px;
  font-family: var(--body);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.45;
}
.order__summary .err {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--brick-d);
  margin-top: 12px;
  min-height: 14px;
}


/* ── Dates remaining counter ─────────────────────────── */
.dates-counter {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 12px;
}
.dates-counter b {
  font-weight: 500;
  color: var(--brick-d);
}
