/* FoodMapz — base theme.
   Built for someone with poor attention and poor motor control: big targets,
   big type, one obvious action per screen. Placeholder palette until branding. */

:root {
  --ink:        #16211c;
  --ink-soft:   #4a5a52;
  --paper:      #f7f6f1;
  --card:       #ffffff;
  --line:       #dfe3dc;
  --brand:      #1f6b4a;
  --brand-deep: #14503a;
  --brand-dark: #0e3628;
  --accent:     #d4761f;   /* ACTIVE state only — never decoration */
  --danger:     #a3301d;

  --tap: 60px;             /* minimum interactive height, everywhere */
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; width: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Full-width and fluid — no fixed max-width anywhere. */
.wrap {
  width: 100%;
  padding: clamp(18px, 4vw, 52px);
  text-align: left;
}

/* ------------------------------------------------------------------ header */
.site-head {
  background: var(--brand-deep);
  color: #fff;
  width: 100%;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: clamp(14px, 2vw, 22px);
  padding-bottom: clamp(14px, 2vw, 22px);
}

.brand {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0;
  color: #fff;
  text-decoration: none;
}

.brand span { color: var(--accent); }

.head-links { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------------------- hero */
/* The photo is optional: if /images/home/hero.jpg is missing the brand colour
   underneath still shows and the hero looks intentional, never broken. The
   scrim is what keeps white text readable over whatever photo is dropped in. */
.hero {
  background-color: var(--brand-deep);
  background-image:
    linear-gradient(to right,
      rgba(10, 40, 29, .76) 0%,
      rgba(10, 40, 29, .52) 45%,
      rgba(10, 40, 29, .22) 100%),
    url('/images/home/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  width: 100%;
  min-height: clamp(380px, 56vh, 620px);
  display: flex;
  align-items: center;
  padding-bottom: clamp(28px, 6vw, 72px);
}

/* On a phone the text sits over the middle of the photo, so darken evenly. */
@media (max-width: 700px) {
  .hero {
    background-image:
      linear-gradient(rgba(10, 40, 29, .68), rgba(10, 40, 29, .68)),
      url('/images/home/hero.jpg');
    min-height: 0;
    display: block;
  }
}

.hero h1 {
  font-size: clamp(34px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0 0 clamp(18px, 3vw, 34px);
  color: #fff;
  /* carries the contrast so the scrim can stay light and the food show through */
  text-shadow: 0 2px 18px rgba(6, 24, 17, .55), 0 1px 3px rgba(6, 24, 17, .45);
}

.hero .sub {
  font-size: clamp(17px, 2vw, 22px);
  color: #eaf2ed;
  margin: 0 0 clamp(20px, 3vw, 30px);
  max-width: 60ch;
  text-shadow: 0 1px 10px rgba(6, 24, 17, .65), 0 1px 2px rgba(6, 24, 17, .5);
}

/* Results page: just a search bar on brand colour, no photo, no height. */
.hero-compact {
  background-image: none;
  background-color: var(--brand-deep);
  min-height: 0;
  display: block;
  padding-bottom: clamp(20px, 3vw, 34px);
}

/* --------------------------------------------------------------- searchbar */
.searchbar {
  display: flex;
  gap: 12px;
  width: 100%;
  /* Capped so the box does not run the width of a desktop screen. Still fluid,
     and the phone rule below releases it back to full width. */
  max-width: clamp(340px, 34vw, 600px);
  flex-wrap: wrap;
}

.searchbar input[type="text"] {
  flex: 1 1 200px;
  /* without this the input cannot shrink below its intrinsic text width and
     shoves the button onto a second line */
  min-width: 0;
  min-height: var(--tap);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  padding: 12px 20px;
  border: 3px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.searchbar input[type="text"]::placeholder { color: #8b998f; font-weight: 500; }

.searchbar input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);   /* active */
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 14px 30px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  transition: background .12s ease;
}

.btn:hover  { background: var(--brand-dark); }
.btn:active { background: var(--accent); }   /* active */
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-go     { flex: 0 0 auto; background: var(--accent); }
.btn-go:hover  { background: #b8631a; }
.btn-go:active { background: #96500f; }

.btn-on-dark { background: rgba(255,255,255,.14); color: #fff; }
.btn-on-dark:hover { background: rgba(255,255,255,.24); }

.btn-block { width: 100%; }

/* ----------------------------------------------------------------- layout */
h2 { font-size: clamp(22px, 3vw, 34px); line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: clamp(18px, 2.2vw, 23px); margin: 0 0 10px; }
p  { margin: 0 0 14px; max-width: 68ch; color: var(--ink-soft); }

a { color: var(--brand); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(20px, 3vw, 36px);
  width: 100%;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 10px;
  padding: 18px 20px;
}

.steps .n {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.steps strong { display: block; font-size: 19px; margin-bottom: 4px; }
.steps span   { color: var(--ink-soft); font-size: 15px; }

/* ------------------------------------------------------------------ forms */
.form-row { margin: 0 0 20px; width: 100%; }

label.field {
  display: block;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"] {
  width: 100%;
  min-height: var(--tap);
  font-size: 19px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent);   /* active */
}

.hint { font-size: 15px; color: var(--ink-soft); margin: 8px 0 0; }

/* big radio cards — one obvious tap each */
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.choice label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  padding: 16px 20px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.choice input { width: 24px; height: 24px; accent-color: var(--accent); }
.choice label:has(input:checked) { border-color: var(--accent); }  /* active */

.notice {
  border-left: 5px solid var(--danger);
  background: #fbeeea;
  color: #6b2417;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 0 0 22px;
  font-weight: 600;
}

.notice-ok {
  border-left-color: var(--brand);
  background: #eaf3ee;
  color: #14503a;
}

/* ----------------------------------------------------------------- footer */
.site-foot {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}

.site-foot a { color: var(--ink-soft); }

/* On a phone the search box goes back to full width — it is already a good
   size there — and the button too, which is easier to hit than a stub. */
@media (max-width: 700px) {
  .searchbar { max-width: none; }
}

@media (max-width: 560px) {
  .searchbar .btn-go { width: 100%; }
}

/* =================================================== restaurant back office */
.opt { font-weight: 400; color: var(--ink-soft); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  width: 100%;
}

.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.tile:hover { border-color: var(--accent); }
.tile strong { display: block; font-size: 19px; margin-bottom: 4px; }
.tile span { color: var(--ink-soft); font-size: 15px; }

.checklist { list-style: none; margin: 0; padding: 0; }

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.checklist li:last-child { border-bottom: 0; }

.checklist .mark {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}

.checklist .done .mark { background: var(--brand); border-color: var(--brand); }
.checklist .done { color: var(--ink-soft); }

/* ------------------------------------------------------------- menu list */
.menu-group { margin-top: 30px; width: 100%; }

.menu-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 14px;
}

.itemlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.itemlist li {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; flex-wrap: wrap;
}

.thumb {
  width: 68px; height: 68px; flex: 0 0 68px;
  object-fit: cover; border-radius: 8px; background: var(--paper);
}

.thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-soft); border: 1px dashed var(--line);
}

.thumb-lg {
  display: block; max-width: 260px; width: 100%;
  border-radius: 10px; margin-bottom: 12px; border: 1px solid var(--line);
}

.itemtext { flex: 1 1 180px; min-width: 0; }
.itemtext strong { display: block; font-size: 18px; }
.itemtext span { display: block; color: var(--ink-soft); font-size: 15px; }
.itemtext .off { color: var(--danger); font-weight: 600; font-size: 14px; }

.itemactions { display: flex; gap: 8px; align-items: center; }
.itemactions form { margin: 0; }

.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 16px; }
.btn-quiet { background: #5c6b62; }
.btn-quiet:hover { background: #46534b; }

.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font: inherit; font-size: 15px; text-decoration: underline;
}

.linkbtn.danger { color: var(--danger); }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input[type="text"] {
  flex: 1 1 200px; min-height: var(--tap); font-size: 17px;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.inline-form input:focus { outline: none; border-color: var(--accent); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 16px; }

.form-row select {
  width: 100%; min-height: var(--tap); font-size: 18px;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.form-row select:focus { outline: none; border-color: var(--accent); }

.form-row input[type="file"] {
  width: 100%; font-size: 16px; padding: 14px;
  border: 2px dashed var(--line); border-radius: 10px; background: #fff;
}

/* ------------------------------------------------------------- options */
.optgroup {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; margin-bottom: 14px; background: var(--paper);
}

.opts { display: flex; flex-direction: column; gap: 10px; }

.optrow { display: flex; gap: 10px; flex-wrap: wrap; }
.optrow input { flex: 1 1 140px; min-height: 52px; font-size: 17px;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 8px; background: #fff; }
.optrow input:last-child { flex: 0 0 110px; }
.optrow input:focus { outline: none; border-color: var(--accent); }

.suffixed { display: flex; align-items: stretch; gap: 0; }
.suffixed input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.suffixed .suffix {
  display: flex; align-items: center; padding: 0 16px;
  border: 2px solid var(--line); border-left: 0;
  border-radius: 0 10px 10px 0; background: var(--paper);
  font-weight: 700; color: var(--ink-soft);
}

/* Worked money example in admin — percentages hide mistakes, dollars do not. */
.worked {
  border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: 10px; padding: 16px 18px; margin: 0 0 22px; background: var(--paper);
}
.worked h4 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--brand); }
.worked table { width: 100%; border-collapse: collapse; font-size: 16px; }
.worked td { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.worked td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600;
  color: var(--ink); white-space: nowrap; }
.worked tr.out td { color: var(--accent); }
.worked tr.out td.n { color: var(--accent); }
.worked tr.total td { border-bottom: 0; font-weight: 700; color: var(--ink); padding-top: 10px; }
.worked tr.total.bad td, .worked tr.total.bad td.n { color: var(--danger); }
.warnline { color: var(--danger); font-weight: 600; margin: 10px 0 0; font-size: 15px; }
