/* One stylesheet for all pages. Restaurant colours come in as --brand, --bg, --text and --muted
   (worked out at build time), and chosen fonts as --font-heading and --font-body. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --line: color-mix(in srgb, var(--text) 12%, var(--bg));
  --rule: color-mix(in srgb, var(--text) 8%, var(--bg));
  --leader: color-mix(in srgb, var(--text) 22%, var(--bg));
  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --card: color-mix(in srgb, #fff 70%, var(--bg));
  --radius: 12px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
body { margin: 0; background: var(--bg); padding-bottom: 88px; font-family: var(--font-body); overflow-wrap: break-word; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: var(--font-heading); font-weight: 700; }
button { font: inherit; cursor: pointer; }
.small { font-size: 0.875rem; color: var(--muted); }
.error { color: #b3261e; min-height: 1.2em; margin: 0.5rem 0; }
.link { background: none; border: 0; color: var(--brand); padding: 0.25rem; }
.primary {
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 0.75rem 1.25rem; font-weight: 600;
}
.primary:disabled { opacity: 0.6; }
.danger { background: none; border: 1px solid #b3261e; color: #b3261e; border-radius: 999px; padding: 0.7rem 1.1rem; }

/* Header: a full-width band; its content lines up with the 712px column */
.hero, .info { padding-inline: max(24px, calc((100% - 712px) / 2)); background: var(--brand); color: var(--bg); }
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 40px; padding-bottom: 32px; }
.hero p { margin: 0; }
.logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.place { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { font-size: 40px; line-height: 1.05; overflow-wrap: anywhere; }
.tagline { font-size: 16px; }
.open-status { font-size: 0.9rem; font-weight: 700; }
.open-status.open::before, .open-status.closed::before {
  content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  margin-right: 0.4rem; vertical-align: 0.05rem;
}
.open-status.open::before { background: #1e8e3e; }
.open-status.closed::before { background: #b3261e; }

/* Pills: the header's two links, Öppna karta and Ring, and the category tabs */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill, .category-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; white-space: nowrap;
}
.hero .pill { background: var(--bg); color: var(--brand); border-color: var(--bg); }
.hero .pill + .pill { background: transparent; color: var(--bg); }
.find .pill { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.find .pill + .pill { background: transparent; color: var(--brand); }

/* Category tabs, only with two or more categories: one row that scrolls inside itself */
.category-nav {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 8px max(24px, calc((100% - 712px) / 2)); border-bottom: 1px solid var(--line);
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a { flex: none; color: var(--text); border-color: var(--line); }

/* Menu */
.menu { max-width: 760px; margin: 0 auto; }
.category { padding: 32px 24px 0; scroll-margin-top: 64px; }
.category h2, .find h2 { display: flex; align-items: center; gap: 12px; font-size: 28px; color: var(--brand); }
.category h2::after, .find h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.category-desc { color: var(--muted); margin: 0.25rem 0 0; }
.items { list-style: none; margin: 8px 0 0; padding: 0; }
.item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.item-row { display: flex; align-items: baseline; gap: 8px; }
.item h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.3; min-width: 0; }
.dots { flex: 1 0 16px; min-width: 16px; border-bottom: 2px dotted var(--leader); }
.price { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.item p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 300px; }
.item .allergens { font-size: 0.8rem; }
.item-buy { display: flex; justify-content: flex-end; margin-top: 8px; }
.add {
  border: 1px solid var(--brand); color: var(--brand); background: var(--card);
  border-radius: 999px; padding: 0.35rem 0.8rem; font-weight: 700; white-space: nowrap;
  transition: transform 0.15s;
}
.add.added { transform: scale(1.08); background: var(--brand); color: #fff; }
.unavailable h3, .unavailable .price { color: var(--muted); }
.sold-out { font-size: 0.8rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.tag { font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--line); }

/* Hitta hit */
.find { max-width: 760px; margin: 0 auto; padding: 40px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.find p { margin: 0; }
.address { font-size: 16px; }
.find h3 { font-family: var(--font-heading); font-weight: 700; font-size: 22px; scroll-margin-top: 16px; }
.hours { border-collapse: collapse; width: 100%; }
.hours th { text-align: left; font-weight: 400; padding: 4px 16px 4px 0; }
.hours td { text-align: right; padding: 4px 0; font-variant-numeric: tabular-nums; }
.hours .closed { color: var(--muted); }

/* Footer: a full-width band */
.info { margin-top: 48px; padding-top: 32px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 8px; }
.info p { margin: 0; }
.footer-name { font-family: var(--font-heading); font-weight: 700; font-size: 22px; }
.info .company { font-size: 14px; color: var(--bg); overflow-wrap: anywhere; }

/* Cart */
.cart-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(728px, calc(100% - 2rem)); z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 0.95rem 1.4rem; font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / 0.2);
}
.cart-bar[hidden] { display: none; }
.cart {
  border: 0; padding: 0; width: min(560px, 100%); max-height: 92vh; border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.cart::backdrop { background: rgb(0 0 0 / 0.45); }
@media (max-width: 600px) {
  .cart { margin: auto 0 0; max-width: 100%; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
}
.cart form { padding: 1.25rem; display: grid; gap: 0.75rem; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line);
}
.cart-lines .empty { color: var(--muted); }
.line-name { flex: 1; }
.line-price { white-space: nowrap; }
.qty-controls { display: inline-flex; align-items: center; gap: 0.4rem; }
.qty {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--text); line-height: 1;
}
.qty-n { min-width: 1.2rem; text-align: center; font-weight: 600; }
.cart-total { display: flex; justify-content: space-between; margin: 0; font-size: 1.1rem; }
.cart-fee { display: flex; justify-content: space-between; margin: 0; color: var(--muted); }
.fields { display: grid; gap: 0.75rem; }
.fields label { display: grid; gap: 0.3rem; font-size: 0.9rem; font-weight: 500; }
.fields input, .fields textarea, .admin-login input {
  font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: #1f1b18;
}
.fields .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fields p { margin: 0; }

/* Customer status page */
.status-page { padding: 1rem; }
.status-card {
  max-width: 520px; margin: 2rem auto; background: var(--card); border-radius: var(--radius);
  padding: 1.5rem; border: 1px solid var(--line); display: grid; gap: 0.75rem;
}
.back { font-weight: 600; text-decoration: none; }
.status-text { font-size: 1.2rem; font-weight: 600; margin: 0; }
[data-status="ready"] .status-text { color: #1e8e3e; }
[data-status="rejected"] .status-text { color: #b3261e; }

/* Restaurant order screen */
.admin-page { padding-bottom: 1rem; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem; flex-wrap: wrap; }
.admin-head .offline { color: #b3261e; font-weight: 600; }
.admin-login { max-width: 420px; margin: 1rem auto; padding: 0 1rem; }
.admin-login form { display: grid; gap: 0.75rem; }
.admin-login label { display: grid; gap: 0.3rem; }
.board { display: grid; gap: 1rem; padding: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.board h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.col { display: grid; gap: 0.75rem; }
.order { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.order-new { border: 2px solid var(--brand); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 25%, transparent); } }
.order header { display: flex; justify-content: space-between; align-items: baseline; }
.order-code { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.05em; }
.order-time { color: var(--muted); }
.order-items { list-style: none; padding: 0; margin: 0.5rem 0; font-size: 1.1rem; }
.order-note { background: #fff4ce; color: #3d3000; padding: 0.5rem 0.7rem; border-radius: 8px; margin: 0.5rem 0; }
.order-customer { color: var(--muted); margin: 0.5rem 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.accept { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.accept-label { width: 100%; font-weight: 600; }
.accept .primary { padding: 0.7rem 0.9rem; }
