/* Экран «Меню»: тулбар из одинаковых контролов + карточки блюд. */

.food-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.food-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
  z-index: 30;
  margin: 0;
  padding: 12px 16px 0;
  background: transparent;
  border: 0;
}

.food-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  /* воздух между тулбаром и первым заголовком категории (≥ mt-4) */
  padding: 16px 16px 16px;
}

.food-ctl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.food-ctl {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.food-ctl--search { width: 100%; }
.food-ctl--search:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 2px #e2e8f0;
}
.food-cat {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.food-ctl--cat {
  width: 100%;
  padding: 0 28px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: #334155;
  text-align: left;
  cursor: pointer;
  background: #fff;
  outline: none;
}
button.food-ctl--cat::-moz-focus-inner { border: 0; padding: 0; }
.food-ctl--cat:focus-visible {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 2px #e2e8f0;
}

.food-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.food-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.food-switch-ui {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background-color 0.15s ease;
}
.food-switch-ui::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.food-switch-input:checked + .food-switch-ui {
  background: #f43f5e;
}
.food-switch-input:checked + .food-switch-ui::after {
  transform: translateX(16px);
  border-color: #fff;
}
.food-switch-input:focus-visible + .food-switch-ui {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}
.food-switch-text {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .food-switch-ui,
  .food-switch-ui::after { transition: none; }
}

.food-ctl-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.food-ctl--search input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 40px 0 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
  line-height: 40px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.food-ctl--search input:focus { outline: none; }

.food-ctl-clear {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  background: none;
  color: #94a3b8;
  cursor: pointer;
}
.food-ctl-clear[hidden] { display: none !important; }
.food-ctl-clear span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f1f5f9;
}
.food-ctl-clear svg { width: 12px; height: 12px; display: block; }

.food-ctl-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.food-ctl-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -2px;
  border: 4px solid transparent;
  border-top-color: #94a3b8;
  pointer-events: none;
}
.food-ctl-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  max-height: 280px;
  overflow: auto;
  padding: 4px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.food-ctl-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.food-ctl-option:hover { background: #f8fafc; }
.food-ctl-option.is-on {
  background: #f1f5f9;
  font-weight: 700;
}

@media (min-width: 768px) {
  .food-ctl--search { width: 100%; }
  .food-cat { width: 240px; flex: 0 1 240px; }
}

.food-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  overflow: visible;
}

.food-cat-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 24px 0 8px;
  padding: 0 4px;
  background: none;
  border: 0;
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}
.food-cat-count {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: #94a3b8;
}
.food-menu-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  padding: 0 2px 2px;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.food-menu-meta.is-live .food-menu-src {
  color: #047857;
}
.food-menu-src::after {
  content: "·";
  margin-left: 8px;
  color: #94a3b8;
  font-weight: 600;
}
.food-menu-stats {
  font-weight: 600;
  color: #64748b;
}
.food-section:first-child .food-cat-title { margin-top: 0; }

.food-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.food-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.food-row:last-child { border-bottom: 0; }
.food-row.is-stop {
  background: rgba(248, 250, 252, 0.7);
  opacity: 0.6;
}

.food-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.food-info { min-width: 0; flex: 1; }
.food-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}
.food-meta {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
}
.food-stop-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ffe4e6;
  color: #be123c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.food-price {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.food-row.is-stop .food-price {
  color: #94a3b8;
  text-decoration: line-through;
}

/* Кастомный выбор даты / периода (вместо native type=date) */
.date-range {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
  max-width: none;
}
.date-range .date-range-btn {
  width: 100%;
}
.date-range-pop {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  width: min(100%, 320px);
  min-width: 280px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.date-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.date-cal-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.date-cal-nav {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.date-cal-nav:hover { background: #f1f5f9; }
.date-cal-dow,
.date-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.date-cal-dow {
  margin-bottom: 4px;
}
.date-cal-dow span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: lowercase;
  padding: 4px 0;
}
.date-cal-pad { min-height: 36px; }
.date-cal-day {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.date-cal-day:hover:not(:disabled):not(.is-edge) { background: #f1f5f9; }
.date-cal-day.is-in { background: #eff6ff; color: #1d4ed8; }
.date-cal-day.is-edge { background: #2563eb; color: #fff; }
.date-cal-day.is-disabled,
.date-cal-day:disabled {
  color: #cbd5e1;
  cursor: default;
}
.date-cal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.date-cal-link {
  border: 0;
  background: none;
  color: #2563eb;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}
.date-cal-link:hover { text-decoration: underline; }

.bill-date-range,
.od-date-range {
  margin-top: 8px;
}
