/* The wholesale site (D57, D58): mushroommicrofarm.com's colours and type, phone first. Raleway is used when the
   device has it; the site loads no outside fonts, so no visitor's address goes to a font service. */
:root {
  --cream: #fcf8d9;
  --red: #a92322;
  --red-dark: #8a1c1b;
  --sage: #e6efe3;
  --text: #333;
  --muted: #666;
  --line: #d9d9d9;
  --surface: #fff;
  --page: #faf8f2;
  --error: #a92322;
  --font: Raleway, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.55 var(--font); }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
[hidden] { display: none !important; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--cream); border-bottom: 1px solid #efe7b8; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.brand { color: var(--text); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
.tagline { margin: 0; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; }

main { padding-top: 24px; padding-bottom: 32px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 24px 20px; }
.panel:focus { outline: none; }
h1 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.lede { margin: 0 0 20px; color: var(--muted); }

fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 1.05rem; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.95rem; }
.optional { color: var(--muted); font-weight: 400; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.row .grow { flex: 1 1 220px; }
.row .narrow { flex: 0 1 110px; }

input, select, textarea {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9b9b9; border-radius: 4px;
  background: #fff; color: var(--text); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(169, 35, 34, 0.35); outline-offset: 1px; border-color: var(--red); }

.choice { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 400 !important; cursor: pointer; }
.choice input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--red); flex: none; }

.invalid > label, .invalid > legend { color: var(--error); }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

/* The honeypot: present for bots, out of sight and out of the tab order for people. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.turnstile { min-height: 70px; margin: 8px 0 12px; }
.message { margin: 0 0 14px; padding: 10px 12px; border-left: 4px solid var(--error); background: #fbeaea; color: #6b1515; }
.message:focus { outline: none; }

.button {
  display: inline-block; min-height: 48px; padding: 12px 26px; border: 0; border-radius: 4px; background: var(--red);
  color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.button:hover { background: var(--red-dark); }
.button:disabled { opacity: 0.6; cursor: progress; }

.thanks { background: var(--sage); border-color: #c9dbc3; }

/* The order page (D58). */
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.button-quiet { min-height: 44px; padding: 8px 14px; border: 1px solid #b9b9b9; border-radius: 4px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.button-quiet:hover { border-color: var(--red); color: var(--red-dark); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.tab { min-height: 44px; padding: 8px 12px; border: 1px solid #b9b9b9; border-radius: 999px; background: #fff; color: var(--text); font: inherit; cursor: pointer; }
.tab[aria-pressed="true"] { border-color: var(--red); background: var(--red); color: #fff; font-weight: 600; }
.terms { margin: 0 0 16px; }
.items, .orders, .order-lines { margin: 0; padding: 0; list-style: none; }
.items { margin-bottom: 18px; border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-text { flex: 1 1 auto; min-width: 0; }
.item-text label { display: block; font-weight: 600; }
.item-detail { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.item-qty { flex: 0 0 84px; text-align: right; }
.sold-out { color: var(--muted); font-size: 0.92rem; }
.total { min-height: 1.55em; margin: 0 0 12px; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.message-ok { border-left-color: #4d7c43; background: var(--sage); color: #27401f; }
.order { padding: 14px 0; border-bottom: 1px solid var(--line); }
.orders { margin-bottom: 14px; border-top: 1px solid var(--line); }
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.order-lines { margin-top: 6px; }
.badge { padding: 2px 10px; border-radius: 999px; background: #eee; font-size: 0.85rem; font-weight: 600; }
.badge-declined, .badge-cancelled { background: #fbeaea; color: #6b1515; }
.badge-confirmed, .badge-delivered, .badge-invoiced, .badge-paid { background: var(--sage); color: #27401f; }
.badge-received { background: var(--cream); color: #5c5417; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 16px; padding-bottom: 28px; }
.site-footer p { margin: 0 0 6px; }

.notice h2 { margin: 24px 0 6px; font-size: 1.15rem; }
.notice p, .notice li { color: var(--text); }
.notice ul { padding-left: 20px; }
.updated { color: var(--muted); font-size: 0.9rem; }

@media (min-width: 640px) {
  .panel { padding: 32px 36px; }
  h1 { font-size: 1.9rem; }
}
