/* Mingle – éttermi funkciók (feature/etterem): fogás-választó, allergén-jelölés és -szűrő, „Következő fogás” sáv a számlán,
   várakozó fogások a konyhai kijelzőn, „Étterem” beállítás-lap. Csak a meglévő tokeneket használja (világos és sötét téma). */

/* ---- rendelés-képernyő ---- */
.order-resto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4) 0; }
.order-resto[hidden] { display: none; }
.order-resto-label { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.order-course-seg { flex: 1 1 auto; min-width: 0; }
.order-course-seg .seg-btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 var(--space-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-allergen-btn { min-height: 44px; }
.order-allergen-btn.is-active { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--primary); font-weight: 700; }
.ptile-allergen { color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ptile-sub .ptile-allergen::before { content: "· "; font-weight: 400; }
.ptile-sub .ptile-allergen:first-child::before { content: none; }

.allergen-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.allergen-chip {
  display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-3);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--control-line, var(--border)); border-radius: var(--radius); text-align: left; font-size: 14px;
}
.allergen-chip.is-active { background: var(--err-bg); border-color: var(--red); color: var(--text); font-weight: 700; }
.allergen-no {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-3, var(--surface)); color: var(--ink2); font-family: var(--font-num); font-size: 12px; font-weight: 700;
}
.allergen-chip.is-active .allergen-no { background: var(--red); color: var(--surface); }

.order-cart .cart-line .cart-line-course,
.cart-line-course {
  grid-column: 2; justify-self: start; min-height: 30px; margin-top: 2px; padding: 0 10px; border: 1px solid var(--primary);
  border-radius: var(--radius-pill); background: var(--sel-bg); color: var(--sel-fg); font-size: 12.5px; font-weight: 700;
}

/* ---- rendelés-képernyő, az asztal panelja: következő fogás ---- */
.order-course {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); background: var(--info-bg); border-radius: var(--radius);
  box-shadow: inset 4px 0 0 var(--info);
}
.order-course-info { display: flex; flex-direction: column; min-width: 0; }
.order-course-kicker { color: var(--info); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.order-course-name { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-course-fire { flex: none; min-height: 44px; padding: 0 16px; background: var(--info); color: var(--surface); border-color: var(--info); font-weight: 700; }
.order-course-fire:disabled { opacity: .55; }

/* ---- számla: következő fogás ---- */
.bill-course {
  flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--info-bg); border-radius: var(--radius); box-shadow: inset 4px 0 0 var(--info);
}
.bill-course-info { display: flex; flex-direction: column; min-width: 0; }
.bill-course-kicker { color: var(--info); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bill-course-name { font-size: 18px; line-height: 1.2; }
.bill-course-sub { color: var(--ink2); font-size: 13px; }
.bill-course-fire { flex: none; min-height: 52px; padding: 0 22px; background: var(--info); color: var(--surface); border-color: var(--info); font-weight: 700; }
.bill-course-fire:disabled { opacity: .55; }

/* ---- konyhai kijelző: várakozó fogások ---- */
.ticket-list > .ticket-section-title, .ticket-list > .ticket-list-waiting { grid-column: 1 / -1; }
.ticket-section-title { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-4) 0 var(--space-2); color: var(--ink2); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticket-section-count { padding: 0 8px; border-radius: var(--radius-pill); background: var(--surface-2); font-family: var(--font-num); }
.ticket-list-waiting { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.ticket.ticket-held { opacity: .62; background: transparent; outline: 1.5px dashed var(--border-strong, var(--border)); outline-offset: -1.5px; }
.ticket-mark-course.tone-info { background: var(--sel-bg); color: var(--sel-fg); }

/* ---- „Étterem” beállítás-lap ---- */
.resto-view { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; }
.resto-lead { margin: 0; color: var(--ink2); }
.resto-body { display: flex; flex-direction: column; gap: var(--space-4); }
.resto-section { display: flex; flex-direction: column; gap: var(--space-3); }
.resto-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.resto-toggle-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.resto-toggle-label { font-weight: 700; }
.resto-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.resto-toggle .theme-seg { flex: 0 0 160px; }
.resto-opt {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink2); font-size: var(--text-sm); font-weight: 600;
}
.resto-opt[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.resto-courses { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.resto-course-list { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; margin: 0; padding: 0; list-style: none; }
.resto-course { display: flex; align-items: center; gap: var(--space-2); }
.resto-course-no { flex: none; width: 24px; color: var(--muted); font-family: var(--font-num); font-weight: 700; }
.resto-course-input { flex: 1 1 auto; min-width: 0; }
.resto-save-row { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.resto-save-hint { margin: 0; color: var(--muted); font-size: 13px; }
.resto-save { min-width: 180px; }
.resto-station-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.resto-station { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.resto-station-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; }
.resto-station-name { font-weight: 700; }
.resto-station-meta { color: var(--muted); font-size: 13px; }
.resto-station-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.resto-station-add { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.resto-station-input { flex: 1 1 220px; min-width: 0; }
@media (max-width: 600px) {
  .resto-toggle .theme-seg { flex: 1 1 100%; }
  .resto-save { width: 100%; }
  .bill-course { flex-wrap: wrap; }
  .bill-course-fire { width: 100%; }
}
/* az állomás fajtája (Konyha / Pult / Egyéb): a felvétel sorában és a „Módosít” lapon */
.resto-kind { flex: 1 1 300px; }
