/* Bloom design tokens, shared by the customer site and the staff portal. */
:root {
  --ivory: #fbf8f2;
  --cream: #f4eee3;
  --sand: #e9e0d0;
  --paper: #fffdf9;
  --ink: #23251f;
  --ink-2: #4a4d44;
  --muted: #7a7c71;
  --line: #e5ddcf;
  --line-strong: #d6ccba;

  --green: #4f6b4e;
  --green-dark: #3a523a;
  --green-soft: #e6ece0;
  --sage: #9aaa8a;

  --rose: #a9625a;
  --rose-soft: #f5e5e0;

  /* status palette (muted, readable on white) */
  --st-blue: #3f6488;     --st-blue-bg: #e5edf5;
  --st-slate: #4f5a7a;    --st-slate-bg: #e8eaf3;
  --st-amber: #8f6516;    --st-amber-bg: #f6ecd6;
  --st-teal: #2f6f68;     --st-teal-bg: #dff0ec;
  --st-plum: #74507e;     --st-plum-bg: #efe5f1;
  --st-green: #3c6a3b;    --st-green-bg: #e2eedd;
  --st-grey: #6b6b66;     --st-grey-bg: #ecebe7;
  --st-red: #9c3f35;      --st-red-bg: #f6e1dc;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 37, 31, 0.06);
  --shadow: 0 1px 2px rgba(35, 37, 31, 0.05), 0 6px 20px rgba(35, 37, 31, 0.06);
  --shadow-lg: 0 10px 40px rgba(35, 37, 31, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Status badges (shared) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  padding: 3px 9px 3px 8px; border-radius: 999px;
  background: var(--st-grey-bg); color: var(--st-grey);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
/* Order statuses by stage (business profile), so any business's statuses get a colour. */
.stage-new { background: var(--st-blue-bg); color: var(--st-blue); }
.stage-confirmed { background: var(--st-slate-bg); color: var(--st-slate); }
.stage-in_work { background: var(--st-amber-bg); color: var(--st-amber); }
.stage-ready { background: var(--st-teal-bg); color: var(--st-teal); }
.stage-delivery { background: var(--st-plum-bg); color: var(--st-plum); }
.stage-done { background: var(--st-green-bg); color: var(--st-green); }
.stage-cancelled { background: var(--st-red-bg); color: var(--st-red); }
.st-new { background: var(--st-blue-bg); color: var(--st-blue); }
.st-confirmed { background: var(--st-slate-bg); color: var(--st-slate); }
.st-preparing, .st-in-review, .st-unpaid { background: var(--st-amber-bg); color: var(--st-amber); }
.st-ready-for-delivery { background: var(--st-teal-bg); color: var(--st-teal); }
.st-out-for-delivery, .st-pay-on-delivery { background: var(--st-plum-bg); color: var(--st-plum); }
.st-delivered, .st-order-created, .st-paid { background: var(--st-green-bg); color: var(--st-green); }
.st-cancelled, .st-refunded { background: var(--st-red-bg); color: var(--st-red); }
.st-closed { background: var(--st-grey-bg); color: var(--st-grey); }

/* ---- Toasts (shared) ---- */
.toast-stack {
  position: fixed; z-index: 1000; bottom: 20px; right: 20px; left: auto;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; max-width: 360px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in 0.18s ease-out;
}
.toast.error { background: var(--st-red); }
.toast.success { background: var(--green-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 600px) { .toast-stack { left: 16px; right: 16px; } .toast { max-width: none; } }
