/* ==========================================================================
   Mrs Foster's Frosting — order request form
   Standalone single page. Palette matches the logo: soft pink field,
   rose accents, rounded display type.
   ========================================================================== */

:root {
  --pink:        #f4b8d0;
  --pink-soft:   #fadbe8;
  --pink-tint:   #fdeef4;
  --rose:        #e0518f;
  --rose-deep:   #c93d78;
  --ink:         #4a4650;
  --ink-soft:    #6f6a78;
  --gold:        #c8a06a;
  --line:        #f0dae4;
  --danger:      #b3402f;

  --font-display: "Baloo 2", "Quicksand", "Trebuchet MS", system-ui, sans-serif;
  --font-body:    "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --radius:    14px;
  --radius-lg: 22px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(110% 70% at 50% 0%, var(--pink-soft) 0%, rgba(250,219,232,0) 62%),
    linear-gradient(180deg, var(--pink-tint) 0%, #fefbfc 55%);
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ------------------------------------------------------------- logo ----- */

.brand-head {
  text-align: center;
  margin-bottom: 28px;
}

.brand-head__logo {
  display: block;
  width: min(220px, 58vw);
  height: auto;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--pink);
  border: 1px solid #e6d2b4;
  box-shadow: 0 10px 30px rgba(224, 81, 143, 0.18);
  object-fit: cover;
}

.brand-head__tagline {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- card ---- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: 0 12px 34px rgba(224, 81, 143, 0.1);
}

@media (min-width: 640px) {
  .card { padding: 40px 38px; }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.15;
}

.card__lede {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 30px;
}

/* ------------------------------------------------------------- blocks --- */

.block {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
}

fieldset.block > legend {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0;
  margin-bottom: 6px;
}

.block__hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.block__hint a { color: var(--rose-deep); font-weight: 700; }

.label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.opt {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
}

/* ------------------------------------------------------------ inputs ---- */

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea,
select {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { min-height: 100px; resize: vertical; }

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244, 184, 208, 0.45);
}

input.has-error,
textarea.has-error {
  border-color: var(--danger);
}

/* ------------------------------------------------ biscuit box rows ----- */

.qty-rows { display: grid; gap: 10px; }

.qty-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qty-row:has(input[type="checkbox"]:checked) {
  border-color: var(--rose);
  background: var(--pink-tint);
}

.qty-row__check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.qty-row__check input {
  width: 20px;
  height: 20px;
  accent-color: var(--rose);
  margin: 0;
}

.qty-row__label { font-size: 0.97rem; }

/* Bold box name, with the count beneath it */
.qty-row__name {
  display: block;
  font-weight: 700;
}

.qty-row__sub {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 1px;
}

.qty-row__label small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------- inspiration ------- */

.inspire-links {
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--pink-tint);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 14px;
}
.inspire-links a { color: var(--rose-deep); font-weight: 700; }

/* --------------------------------------------------- payment note ------- */

.payment-note {
  background: var(--pink-tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.payment-note__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.payment-note p { margin: 0; font-size: 0.92rem; }

/* --------------------------------------------------- urgent (inline) ---- */

/* Urgent now sits inside the date block, so it needs no outer margin */
.urgent-box--inline { margin: 20px 0 0; }

/* --------------------------------------------------------- logo fix ----- */

/* Hidden unless the logo file can't be found — index.html's onerror handler
   adds .logo-missing to the header. */
.logo-warning { display: none; }

.brand-head.logo-missing .logo-warning {
  display: block;
  margin: 0 auto;
  max-width: 340px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--danger);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: left;
}

.brand-head.logo-missing .logo-warning code {
  background: var(--pink-tint);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.95em;
}

/* Don't show the browser's broken-image placeholder */
.brand-head.logo-missing .brand-head__logo { display: none; }

.qty-row__qty { text-align: center; }
.qty-row__qty:disabled {
  background: #fafafa;
  color: #bbb;
  cursor: not-allowed;
}

/* ------------------------------------------------------------- pills ---- */

.choice-row {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 560px) {
  .choice-row { grid-template-columns: 1fr 1fr; }
}

.choice-row--stack { grid-template-columns: 1fr; }

.pill {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pill:hover { border-color: var(--pink); }

.pill input {
  width: 20px;
  height: 20px;
  accent-color: var(--rose);
  margin: 0;
}

.pill:has(input:checked) {
  border-color: var(--rose);
  background: var(--pink-tint);
  box-shadow: 0 0 0 1px var(--rose) inset;
}

.pill--wide { grid-template-columns: 22px 1fr; }

/* ------------------------------------------------------------ urgent ---- */

.urgent-box {
  background: #fffaf3;
  border: 1px solid #e6d2b4;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}

.urgent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  font-size: 0.9rem;
}

.urgent input {
  width: 20px;
  height: 20px;
  accent-color: var(--rose);
  margin-top: 2px;
}

.urgent strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 2px;
}

/* ------------------------------------------------------------ two-up ---- */

.two-up { display: grid; gap: 20px; margin-bottom: 26px; }
@media (min-width: 560px) { .two-up { grid-template-columns: 1fr 1fr; } }

.field { min-width: 0; }

/* ------------------------------------------------------------ submit ---- */

.btn-submit {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 81, 143, 0.28);
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.btn-submit:hover { background: var(--rose-deep); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { opacity: 0.6; cursor: default; }

.btn-submit--ghost {
  background: #fff;
  color: var(--rose-deep);
  border: 2px solid var(--rose);
  box-shadow: none;
  margin-top: 18px;
}
.btn-submit--ghost:hover { background: var(--pink-soft); }

.fineprint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 14px 0 0;
}
.fineprint a { color: var(--rose-deep); font-weight: 700; }

/* ------------------------------------------------------------- errors --- */

.error {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--danger);
  margin: 8px 0 0;
}
.error:empty { display: none; }
.error--form { text-align: center; margin-top: 16px; }

/* ------------------------------------------------------------ success --- */

.success { text-align: center; padding: 10px 0; }

.success__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  color: var(--rose-deep);
  font-size: 1.9rem;
}

.success h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 10px;
}

.success p { margin: 0 0 10px; }

.success__ref {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--rose-deep);
  background: var(--pink-tint);
  border-radius: 999px;
  padding: 6px 18px;
}
.success__ref:empty { display: none; }

/* ------------------------------------------------------------- footer --- */

.page-foot {
  text-align: center;
  margin-top: 32px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.page-foot p { margin: 0 0 4px; }
.page-foot a { color: var(--rose-deep); font-weight: 700; }
