/* Shared styles for the web planners (/christmas/, /planner/). Uses the
   palette from /styles.css. */
.planner h1 { margin-top: 8px; }
.planner .h3, .planner h3 { font-family: 'Bitter', Georgia, serif; color: var(--olive); font-size: 18px; margin: 20px 0 8px; }
.planner section { max-width: none; }
.card { background: var(--white); border: 1px solid var(--sand); border-radius: 16px; padding: 16px; margin: 20px 0; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.label { font-weight: 600; color: var(--olive); }
.planner input[type=time], .planner select, .planner input[type=text], .planner input[type=number] {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid var(--sand); border-radius: 10px; padding: 8px 10px; min-height: 42px;
}
.stepper { display: flex; align-items: center; gap: 12px; background: #F4EFE2; border-radius: 12px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--white); font-size: 22px; color: var(--olive); cursor: pointer; }
.stepper output { font-family: 'Bitter', Georgia, serif; font-weight: 700; font-size: 20px; color: var(--olive); min-width: 28px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 8px; }
.chips button { font: inherit; font-size: 14px; border: 1px solid var(--sand); background: var(--white); color: var(--olive); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chips button.on { background: var(--moss); border-color: var(--moss); color: var(--white); }
.seg { display: inline-flex; background: #F4EFE2; border-radius: 12px; padding: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 8px 14px; border-radius: 10px; font-size: 15px; color: var(--olive); cursor: pointer; }
.seg input:checked + span { background: var(--white); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--olive); outline-offset: 1px; }
.mainline { font-weight: 500; color: var(--olive); margin: 10px 0 2px; }
.toggles { display: grid; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 12px; border: 1px solid var(--sand); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.ttext { flex: 1; min-width: 0; }
.tname { display: block; font-weight: 600; color: var(--olive); }
.tblurb { display: block; font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--sand); border-radius: 999px; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--moss); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--olive); outline-offset: 2px; }

.plan { margin: 28px 0; padding: 0; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-head h2 { margin: 0; }
.print-btn, .inline-btn { display: inline-block; border: 0; font: inherit; font-weight: 600; cursor: pointer; padding: 10px 16px; }
.doc a.inline-btn { color: var(--white); }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.before { padding-left: 20px; }
.before li { margin-bottom: 6px; }
.warn { background: #FFF6E5; border: 1px solid #E7C98A; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.warn.oven { background: #FCEBE6; border-color: #E3A898; }
.doc table.timeline td.time { white-space: nowrap; font-weight: 600; color: var(--olive); width: 1%; }
table.timeline .tdish { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
table.timeline .what { display: block; }
table.timeline .meta { display: block; font-size: 13px; color: var(--muted); }
table.timeline .note { display: block; font-size: 13px; color: var(--muted); font-style: italic; }
table.timeline .tag { display: inline-block; margin-left: 6px; font-size: 12px; background: #F4EFE2; color: var(--olive); border-radius: 6px; padding: 0 6px; }
table.timeline tr.oven td { background: #F7F3E8; }
table.timeline tr.oven .what { font-weight: 600; color: var(--olive); }
table.timeline tr.hold .what { font-style: italic; }
table.timeline tr.serve td, .doc table.timeline tr.serve td.time { background: var(--moss); color: var(--white); font-weight: 600; }
.print-only { display: none; }

/* Dish editor (/planner/) */
.dishes-edit { display: grid; gap: 10px; }
.dish-edit { border: 1px solid var(--sand); border-radius: 12px; padding: 12px; }
.dish-edit .top { display: flex; gap: 8px; align-items: center; }
.dish-edit .top input { flex: 1; min-width: 0; }
.dish-edit .remove { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.nums label { font-size: 13px; color: var(--muted); display: grid; gap: 2px; align-content: start; }
.nums input { width: 100%; }
.nums .c { font-size: 12px; color: var(--muted); min-height: 16px; }
@media (min-width: 560px) { .nums { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.add { margin-top: 10px; font: inherit; font-weight: 600; border: 1px dashed var(--moss); background: none; color: var(--moss); border-radius: 12px; padding: 10px; width: 100%; cursor: pointer; }
.add[disabled] { opacity: .5; cursor: default; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff; color: #000; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .wrap.doc { max-width: none; padding: 0; }
  .plan { margin: 0; }
  .plan h2 { font-size: 18pt; }
  .plan h3 { font-size: 12pt; margin: 10px 0 4px; }
  .plan, .plan p, .plan li { font-size: 10pt; }
  .before { margin: 0; }
  .before li { margin-bottom: 2px; }
  .table-scroll { border: 1px solid #bbb; overflow: visible; border-radius: 0; }
  .doc th, .doc td { padding: 3px 6px; font-size: 9.5pt; }
  table.timeline .meta, table.timeline .note, table.timeline .tdish { font-size: 8.5pt; }
  table.timeline tr { break-inside: avoid; }
  table.timeline tr.serve td, .doc table.timeline tr.serve td.time { background: #eee; color: #000; }
  .warn { border-color: #999; background: none; }
}
