/* Knolle & Kelle – booking app
   Brand: Noto Sans (Black for headlines, SemiBold for text), colours from "Farben KuK". */

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-display: swap;
}

:root {
  /* Type scale – only these 5 sizes and 3 weights are used.
     1rem = 17px (set on html below). XL/XXL shrink a little on small screens. */
  --fs-s: 0.85rem;
  --fs-m: 21px;
  --fs-xxl: clamp(1.9rem, 6vw, 2.5rem);
  /* Currently 3 steps (S · M · XXL): L is shown as M, XL as XXL.
     The values for 5 steps are kept; the Stil-Editor switch "5 Stufen" uses them. */
  --fs-l-5: 25px;
  --fs-xl-5: clamp(1.45rem, 4vw, 1.75rem);
  --fs-l: var(--fs-m);
  --fs-xl: var(--fs-xxl);
  --fw-regular: 500;
  --fw-bold: 700;
  --fw-black: 900;

  /* Buttons: colours per state (Stil-Editor → "Button" section). Change here or in the editor. */
  --button-border-width: 2px;
  --button-normal-bg: var(--kuk-green); --button-normal-fg: #fff; --button-normal-border: var(--kuk-green);
  --button-hover-bg: #1f3026; --button-hover-fg: #fff; --button-hover-border: #1f3026;
  --button-disabled-bg: var(--kuk-green); --button-disabled-fg: #fff; --button-disabled-border: var(--kuk-green);
  --button-disabled-opacity: 0.4;
  --book-border-width: 2px;
  --book-normal-bg: var(--kuk-orange); --book-normal-fg: var(--kuk-green); --book-normal-border: var(--kuk-orange);
  --book-hover-bg: #ffa04a; --book-hover-fg: var(--kuk-green); --book-hover-border: #ffa04a;
  --book-disabled-bg: var(--kuk-orange); --book-disabled-fg: var(--kuk-green); --book-disabled-border: var(--kuk-orange);
  --book-disabled-opacity: 0.4;
  --cancel-border-width: 2px;
  --cancel-normal-bg: transparent; --cancel-normal-fg: #a3204a; --cancel-normal-border: #e7a9bd;
  --cancel-hover-bg: #fde3ea; --cancel-hover-fg: #a3204a; --cancel-hover-border: #e7a9bd;
  --choice-border-width: 2px;
  /* not selected: transparent, white outline + text · selected: reversed (white, green text)
     hover over a not-selected one shows how it looks selected (--choice-hover-* unset = same as selected) */
  --choice-normal-bg: transparent; --choice-normal-fg: #fff; --choice-normal-border: #fff;
  --choice-selected-bg: #fff; --choice-selected-fg: var(--kuk-green); --choice-selected-border: #fff;

  /* Brand colours */
  --kuk-green: #2e4436;
  --kuk-pink: #fa7ba6;
  --kuk-orange: #ff8108;
  --kuk-mint: #a3d0a7;
  --kuk-rose: #f0dae2;
  --kuk-sun: #fed68e;

  /* Roles */
  --ink: var(--kuk-green);
  --ink-soft: #5b6d61;
  --bg: #faf9f2; /* "Rübenhell extrahell", same as the WordPress site */
  --surface: #ffffff;
  --line: #e4e0d8;
  --accent: var(--kuk-pink);
  --cta: var(--kuk-green);
  --ok-bg: #e6f3e7;
  --warn-bg: #fff1d6;
  --err-bg: #fde3ea;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(46, 68, 54, 0.06), 0 6px 20px rgba(46, 68, 54, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Noto Sans", system-ui, sans-serif;
  font-weight: var(--fw-regular);
  font-size: var(--fs-m);
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #000; }

h1, h2, h3 { font-weight: var(--fw-black); line-height: 1.1; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-l); }
h3 { font-size: var(--fs-m); }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-soft); font-weight: var(--fw-regular); }
.muted { color: var(--kuk-green); font-weight: var(--fw-black); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: auto; }
.brand span { font-weight: var(--fw-black); font-size: var(--fs-l); line-height: 1; }
.brand small { display: block; font-size: var(--fs-s); font-weight: var(--fw-regular); color: var(--ink-soft); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; font-size: var(--fs-m); font-weight: var(--fw-black); }
.nav a { text-decoration: none; }
.nav a:not(.btn), .nav button.link { color: inherit; } /* colour comes from .nav (Stil-Editor: Menü oben) */
.nav a.active { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.nav button.link { text-decoration: none; }
.nav-staff { background: var(--kuk-sun); padding: 2px 10px; border-radius: 999px; }
.inline { display: inline; margin: 0; }

main.wrap { padding-top: 28px; padding-bottom: 120px; min-height: 60vh; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0; font-size: var(--fs-s); color: var(--ink-soft); }

/* Buttons */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: var(--fw-bold); cursor: pointer; text-decoration: none;
  border: var(--button-border-width) solid var(--button-normal-border);
  background: var(--button-normal-bg); color: var(--button-normal-fg);
  border-radius: 999px; padding: 11px 22px; line-height: 1.1;
}
.btn:hover, button.btn:hover { background: var(--button-hover-bg); color: var(--button-hover-fg); border-color: var(--button-hover-border); }
.btn:disabled, button.btn:disabled {
  background: var(--button-disabled-bg); color: var(--button-disabled-fg); border-color: var(--button-disabled-border);
  opacity: var(--button-disabled-opacity); cursor: not-allowed;
}
.btn-ghost { background: transparent; color: var(--cta); }
.btn-ghost:hover { background: var(--kuk-rose); color: var(--cta); }
.btn-pay { background: var(--kuk-orange); border-color: var(--kuk-orange); color: var(--kuk-green); }
.btn-pay:hover { background: #e97300; color: var(--kuk-green); }
.btn-small { padding: 6px 14px; font-size: var(--fs-s); }
/* "Stornieren" */
.btn.btn-danger, button.btn.btn-danger {
  background: var(--cancel-normal-bg); color: var(--cancel-normal-fg);
  border: var(--cancel-border-width) solid var(--cancel-normal-border);
}
.btn.btn-danger:hover, button.btn.btn-danger:hover { background: var(--cancel-hover-bg); color: var(--cancel-hover-fg); border-color: var(--cancel-hover-border); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); }

/* Messages */
.messages { display: grid; gap: 8px; margin-bottom: 20px; }
.msg { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ok-bg); }
.msg-error { background: var(--err-bg); }
.msg-info, .msg-warning { background: var(--warn-bg); }

/* Hero */
.hero { margin-bottom: 28px; }
.hero .lead { font-size: var(--fs-m); font-weight: var(--fw-black); max-width: 46ch; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.credit-pill { background: var(--kuk-mint); border-radius: 999px; padding: 8px 16px; font-weight: var(--fw-bold); white-space: nowrap; }

/* Menu plan: list per month, grouped by calendar week (like the old booking form) */
.month { margin-bottom: 36px; }
.month > summary { list-style: none; cursor: pointer; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.month > summary::-webkit-details-marker { display: none; }
.month > summary h2 { display: inline; font-size: var(--fs-xl); }
.month > summary::after { content: "–"; float: right; font-weight: var(--fw-black); font-size: var(--fs-xl); line-height: 1; }
.month:not([open]) > summary::after { content: "+"; }

.week { display: grid; grid-template-columns: 90px 1fr; gap: 0 16px; border-bottom: 2px solid var(--ink); }
.week-kw { line-height: 1.2; align-self: center; padding: 14px 0; }
.week-kw-label { display: block; font-weight: var(--fw-black); font-size: var(--fs-l); color: var(--kuk-green); }
.week-kw-num { display: block; font-size: var(--fs-l); font-weight: var(--fw-black); color: var(--ink); }

.row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 20px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
/* day you jumped to from "Meine Buchungen": pink frame with room around the content.
   The row grows sideways by the same amount it gets as padding, so the columns stay in line. */
.row:target {
  outline: 3px solid var(--kuk-pink); outline-offset: -3px; border-radius: var(--radius);
  margin-inline: -18px; padding: 18px; scroll-margin-top: 80px;
}
.row-date {
  font-weight: var(--fw-black); font-size: var(--fs-m); color: var(--kuk-green); white-space: nowrap; align-self: start;
  /* column width grows with the date's font size (10em fits "Mi, 30. September"), so dishes stay aligned */
  min-width: 10em;
}
.row-dish { align-self: start; }
.row-dish { font-weight: var(--fw-black); font-size: var(--fs-l); line-height: 1.3; }
.row-desc { display: block; font-weight: var(--fw-black); font-size: var(--fs-m); color: var(--kuk-green); }
.row-allergens { display: block; font-weight: var(--fw-black); font-size: var(--fs-s); color: var(--kuk-green); margin-top: 2px; }
.row-qty { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 120px; }
.row--picked { background: linear-gradient(90deg, transparent, #f3faf3 20%, #f3faf3 80%, transparent); }
.row--full, .row--closed { opacity: 0.55; }

.stepper { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.stepper input {
  width: 2.4em; text-align: center; border: 0; font: inherit; font-weight: var(--fw-black); color: var(--ink);
  background: transparent; -moz-appearance: textfield; appearance: textfield; padding: 4px 0;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.stepper:focus-within { outline: 3px solid var(--kuk-pink); outline-offset: 2px; }
.step {
  width: 34px; height: 34px; border: 0; background: none; font: inherit; font-weight: var(--fw-black); font-size: var(--fs-l);
  color: var(--ink); cursor: pointer; border-radius: 999px;
}
.step:hover { background: var(--kuk-rose); }
.row--picked .stepper { background: var(--kuk-green); }
.row--picked .stepper input, .row--picked .step { color: #fff; }
.row--picked .step:hover { background: #1f3026; }

.badge { font-size: var(--fs-s); font-weight: var(--fw-black); padding: 3px 10px; border-radius: 999px; background: var(--kuk-rose); white-space: nowrap; }
.row--open .badge { background: var(--kuk-sun); }
.row--booked .badge { background: var(--kuk-green); color: #fff; }
.row--booked { background: linear-gradient(90deg, transparent, #f1f8f1 20%, #f1f8f1 80%, transparent); }
/* Meine Buchungen: one row per day, the single bookings listed inside */
.upcoming { margin-bottom: 36px; }
.upcoming-head h2 { font-size: var(--fs-l); margin: 0; }
/* "Kommende Essen" and the Guthaben field sit on one line (same text baseline) */
.upcoming-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.parts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
/* Meine Buchungen: left column = date, below it total + "dazu buchen"; right = dish + single bookings.
   Phones: date, dish, then total + "dazu buchen" in one line, then the single bookings. */
.row--mine { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "date dish" "qty parts"; align-items: start; }
.row--mine .row-date { grid-area: date; }
.row--mine .row-dish { grid-area: dish; }
.row--mine .row-qty { grid-area: qty; align-items: flex-start; align-self: start; min-width: 0; padding-top: 4px; }
.row--mine .row-parts { grid-area: parts; min-width: 0; }
.parts li {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: var(--fs-s); font-weight: var(--fw-regular);
}
.parts li form { margin: 0; grid-column: 2; justify-self: end; }
.parts strong { font-weight: var(--fw-black); }
.part-date { display: block; font-size: var(--fs-s); color: var(--ink-soft); }
.add-more { font-size: var(--fs-s); font-weight: var(--fw-black); color: var(--kuk-green); white-space: nowrap; }
.add-label { font-size: var(--fs-s); font-weight: var(--fw-black); color: var(--kuk-green); }

@media (max-width: 760px) {
  .week { grid-template-columns: minmax(0, 1fr); } /* never wider than the screen */
  .week-kw { padding: 12px 0 0; }
  .week-kw-label, .week-kw-num { display: inline; }
  .week-kw-num { font-size: var(--fs-s); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row-date { grid-column: 1 / -1; min-width: 0; }
  .row--mine { grid-template-columns: minmax(0, 1fr); grid-template-areas: "date" "dish" "qty" "parts"; }
  .row--mine .row-qty { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; min-width: 0; }
  .parts li { padding: 14px 16px; }
}

.empty { padding: 32px; text-align: center; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); }

/* Phones: the booking bar sits at the end of the list. As soon as portions are chosen, a small bar
   floats at the bottom and leads there ("Preis & Bezahlung"). Hidden while the booking bar is visible. */
.mini-checkout { display: none; }
@media (max-width: 760px) {
  .mini-checkout {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--kuk-green); color: #fff;
    text-decoration: none; font-size: var(--fs-s); box-shadow: 0 10px 30px rgba(46, 68, 54, 0.35);
  }
  .mini-checkout:hover { color: #fff; }
  .mini-checkout[hidden] { display: none; }
  .mini-checkout strong { font-weight: var(--fw-black); font-variant-numeric: tabular-nums; }
  .mini-go {
    background: var(--kuk-orange); color: var(--kuk-green); border-radius: 999px; padding: 8px 14px;
    font-weight: var(--fw-black); white-space: nowrap;
  }
  .mini-checkout.pop { animation: mini-pop 0.5s ease-out; }
  .mini-checkout.pop .mini-go { animation: mini-nudge 1.2s ease-in-out 0.5s 2; }
}
@keyframes mini-pop { 0% { transform: translateY(140%); } 70% { transform: translateY(-6px); } 100% { transform: none; } }
@keyframes mini-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .mini-checkout.pop, .mini-checkout.pop .mini-go { animation: none; } }

/* Sticky checkout bar: sum, price per portion, payment method */
.price-note { margin: 24px 0 12px; max-width: 70ch; font-weight: var(--fw-black); color: var(--kuk-green); }
.checkout {
  position: sticky; bottom: 12px; z-index: 5;
  background: var(--kuk-green); color: #fff; border-radius: var(--radius); padding: 16px 18px;
  display: grid; grid-template-columns: 1fr minmax(240px, auto); gap: 12px 32px; align-items: start;
  grid-template-areas: "options sum" "options btn";
  box-shadow: 0 10px 30px rgba(46, 68, 54, 0.3);
}
.checkout a { color: #fff; }
/* the small calculation: one fixed row each, label left, amount right – same on phone and desktop */
.checkout-sum { grid-area: sum; display: grid; gap: 2px; font-weight: var(--fw-regular); }
.checkout-sum .sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.checkout-sum strong { font-weight: var(--fw-black); font-variant-numeric: tabular-nums; white-space: nowrap; } /* digits same width: nothing shifts */
.checkout-sum .due { color: var(--kuk-pink); font-size: var(--fs-l); padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.checkout-options { grid-area: options; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { font-weight: var(--fw-black); font-size: var(--fs-s); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; color: #fff; padding: 0; }
.choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label > span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: var(--choice-border-width) solid var(--choice-normal-border);
  background: var(--choice-normal-bg); color: var(--choice-normal-fg);
  font-weight: var(--fw-bold); white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.choice label:hover input:not(:checked) + span {
  background: var(--choice-hover-bg, var(--choice-selected-bg)); color: var(--choice-hover-fg, var(--choice-selected-fg));
  border-color: var(--choice-hover-border, var(--choice-selected-border));
}
.choice input:checked + span { background: var(--choice-selected-bg); color: var(--choice-selected-fg); border-color: var(--choice-selected-border); }
.choice input:focus-visible + span { outline: 3px solid var(--kuk-pink); outline-offset: 2px; }
.checkout .btn { grid-area: btn; width: 100%; padding: 13px 26px; font-size: var(--fs-m); }
/* "Verbindlich buchen" */
.btn.btn-book, button.btn.btn-book {
  background: var(--book-normal-bg); color: var(--book-normal-fg);
  border: var(--book-border-width) solid var(--book-normal-border);
}
.btn.btn-book:hover, button.btn.btn-book:hover { background: var(--book-hover-bg); color: var(--book-hover-fg); border-color: var(--book-hover-border); }
.btn.btn-book:disabled, button.btn.btn-book:disabled {
  background: var(--book-disabled-bg); color: var(--book-disabled-fg); border-color: var(--book-disabled-border);
  opacity: var(--book-disabled-opacity);
}
@media (max-width: 760px) {
  /* on phones the bar is too tall to float over the list */
  .checkout { position: static; grid-template-columns: 1fr; grid-template-areas: "sum" "options" "btn"; }
  .choice label > span { white-space: normal; }
}

.cta-box { background: var(--kuk-rose); border-radius: var(--radius); padding: 18px 20px; }

/* Cards + tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { font-size: var(--fs-l); }
/* heading with something on the right, e.g. Guthaben + current balance */
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li > span:last-child { white-space: nowrap; flex-shrink: 0; }
.stack { display: grid; gap: 20px; max-width: 720px; }
.list li:last-child { border-bottom: 0; }
.list .when { font-weight: var(--fw-black); }
.list .what { font-weight: var(--fw-regular); color: var(--ink-soft); font-size: var(--fs-s); }
.list .plus { color: #2c7a3a; font-weight: var(--fw-black); }
.list .minus { color: var(--ink-soft); font-weight: var(--fw-bold); }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: var(--fw-black); font-size: var(--fs-s); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
td.num, th.num { text-align: right; }
tr.selected td { background: #f3faf3; }

/* Kitchen: day picker, whole row clickable */
.daylinks { display: grid; margin: 0 -8px; }
.daylink {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; font-weight: var(--fw-bold);
}
.daylink:last-child { border-bottom: 0; }
.daylink:hover { background: var(--kuk-rose); color: var(--ink); }
.daylink.is-selected { background: var(--kuk-green); color: #fff; }
.daylink.is-closed { color: var(--ink-soft); }
.daylink-count { font-variant-numeric: tabular-nums; font-weight: var(--fw-regular); }
.daylink-count strong { font-weight: var(--fw-black); }

.big-number { font-size: var(--fs-xxl); font-weight: var(--fw-black); line-height: 1; }
.allergy { background: var(--warn-bg); border-radius: 6px; padding: 1px 8px; font-weight: var(--fw-bold); }

/* Forms */
.form-card { max-width: 560px; }
.form > div { margin-bottom: 16px; }
.form label { display: block; font-weight: var(--fw-bold); margin-bottom: 6px; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"],
.form input[type="month"], .form input[type="tel"], .form textarea, .form select {
  width: 100%; font: inherit; font-weight: var(--fw-regular); color: var(--ink);
  padding: 11px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--kuk-green); }
.form .helptext, .form .helptext ul { font-size: var(--fs-s); font-weight: var(--fw-regular); color: var(--ink-soft); display: block; margin-top: 4px; }
.form .helptext ul { padding-left: 18px; }
.form .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: #a3204a; font-size: var(--fs-s); }
.form div:has(> input[type="checkbox"]) { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.form :where(div:has(> input[type="checkbox"])) label { order: 2; flex: 1; font-weight: var(--fw-regular); margin: 0; }
.form div:has(> input[type="checkbox"]) input { order: 1; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--kuk-green); }
.form div:has(> input[type="checkbox"]) .errorlist { order: 3; flex-basis: 100%; }
.form #id_weekdays, .form div[id^="id_weekdays"] { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.form #id_weekdays label { font-weight: var(--fw-regular); display: flex; gap: 6px; align-items: center; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Plan: month tiles */
.month-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.month-tile {
  display: grid; gap: 2px; padding: 18px; border-radius: var(--radius); text-decoration: none;
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow);
}
.month-tile:hover { border-color: var(--kuk-green); color: var(--ink); }
.month-tile-year { font-size: var(--fs-s); color: var(--ink-soft); }
.month-tile-name { font-size: var(--fs-l); font-weight: var(--fw-black); }
.month-tile-status { font-size: var(--fs-s); font-weight: var(--fw-regular); }
.month-tile--draft { border-style: dashed; border-color: var(--kuk-pink); }
.month-tile--published { background: var(--ok-bg); border-color: var(--kuk-mint); }

/* Plan: one month as calendar (Mo–So), tiles can be switched on/off */
.plan-nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-s); margin-bottom: 6px; }
.plan-status { padding: 6px 14px; border-radius: 999px; background: var(--kuk-rose); font-size: var(--fs-s); font-weight: var(--fw-black); }
.plan-status--draft { background: #fff; border: 2px dashed var(--kuk-pink); }
.plan-status--published { background: var(--kuk-mint); }
.plan-generate h2, .plan-step { font-size: var(--fs-m); }
.plan-generate-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 8px; }
.weekday-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-pills input, .cal-pick input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-pills span {
  display: inline-block; min-width: 46px; text-align: center; padding: 7px 10px; border-radius: 999px;
  border: 2px solid var(--kuk-green); font-weight: var(--fw-black); cursor: pointer;
}
.weekday-pills input:checked + span { background: var(--kuk-green); color: #fff; }
.weekday-pills input:focus-visible + span { outline: 3px solid var(--kuk-pink); outline-offset: 2px; }
.plan-capacity { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-bold); }
.plan-capacity input { width: 80px; font: inherit; padding: 6px 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 12px 0 20px; }
.cal-head { font-size: var(--fs-s); font-weight: var(--fw-black); color: var(--ink-soft); text-align: center; }
.cal-tile {
  display: grid; gap: 6px; align-content: start; min-height: 104px; padding: 8px;
  border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface);
}
.cal-tile--outside { border: 0; background: none; min-height: 0; }
.cal-pick { display: grid; gap: 2px; cursor: pointer; }
.cal-date { font-weight: var(--fw-black); font-size: var(--fs-m); }
.cal-wd { display: none; }
.cal-state { font-size: var(--fs-s); font-weight: var(--fw-regular); color: var(--ink-soft); }
.cal-dish {
  width: 100%; font: inherit; font-size: var(--fs-s); padding: 5px 7px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; display: none;
}
.cal-dish-text { font-size: var(--fs-s); }
/* chosen day: dashed pink = draft, green = published */
.cal-tile:has(.cal-pick input:checked) { border: 2px dashed var(--kuk-pink); background: #fff7fa; }
.cal-tile:has(.cal-pick input:checked) .cal-dish { display: block; }
.cal-tile--published:has(.cal-pick input:checked) { border: 2px solid var(--kuk-green); background: var(--ok-bg); }
.cal-tile:not(:has(.cal-pick input:checked)) .cal-state { color: var(--ink-soft); }
.cal-tile:has(.cal-pick input:focus-visible) { outline: 3px solid var(--kuk-pink); outline-offset: 2px; }
.cal-tile:hover:not(.cal-tile--past):not(.cal-tile--outside) { border-color: var(--kuk-green); }
.cal-tile--past { opacity: 0.45; }
.cal-tile--past .cal-pick { cursor: default; }
.cal-tile--locked .cal-pick { cursor: not-allowed; }
.plan-actions {
  position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 10px 14px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(46, 68, 54, 0.2);
}
.plan-actions .muted { flex: 1 1 260px; font-size: var(--fs-s); }
.plan-actions .btn-book { width: auto; }
@media (max-width: 760px) {
  /* phones: list of the month's days instead of a 7-column grid */
  .cal { grid-template-columns: minmax(0, 1fr); }
  .cal-head, .cal-tile--outside { display: none; }
  .cal-tile { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .cal-pick { grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
  .cal-wd { display: inline; }
}

/* SumUp placeholder */
.sumup-box { border: 2px dashed var(--kuk-orange); border-radius: var(--radius); padding: 20px; background: #fff8f0; }

/* Print: kitchen list */
@media print {
  .site-header, .site-footer, .no-print, .messages { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  main.wrap { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Embedded on WordPress (iframe) */
body.embed main.wrap { padding-top: 8px; padding-bottom: 8px; }
