/* Layout is based on available content width, including when the sidebar opens. */
.customer-page { container: customer-page / inline-size; }
#section-customer { display: flex; flex-direction: column; gap: 20px; }
#section-customer > *, #menu-container > *, .customer-order-hub > * { min-width: 0; }
#menu-container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#menu-container .menu-card { margin: 0; align-items: stretch; }
#menu-container .menu-card > :first-child { flex-shrink: 0; }
#menu-container .menu-card > :last-child { min-width: 0; }

.customer-order-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding-top: 8px;
}
.order-hub-primary { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hub-card, .order-queue { min-width: 0; padding: clamp(18px, 2.5cqi, 26px); border-radius: 22px; }
.hub-card {
  background: #fff;
  border: 1px solid #f0e6dd;
  box-shadow: 0 5px 20px -12px #5427192b;
}
.hub-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hub-icon {
  display: inline-flex;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffe0bf;
  border-radius: 14px;
  background: #fff5e8;
  color: #ba4810;
  font-size: 23px;
}
.hub-heading-copy { min-width: 0; }
.hub-heading-copy h3 { margin: 0; font-size: 17px; font-weight: 850; line-height: 1.3; letter-spacing: -.025em; }
.hub-heading-copy p { margin: 5px 0 0; color: #78716c; font-size: 12px; line-height: 1.5; }
.hub-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hub-field label { font-size: 12px; font-weight: 750; color: #44403c; }
.hub-field label span { font-weight: 400; color: #78716c; }
.hub-field .input-brand { width: 100%; min-width: 0; min-height: 48px; padding: 12px; font-size: 13px; color: #292524; border-radius: 12px; }
.hub-field .input-brand::placeholder { color: #78716c; }
.hub-field textarea { display: block; resize: vertical; line-height: 1.6; }
.hub-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  transition: background .18s ease, transform .18s ease;
}
.hub-button i { font-size: 18px; }
.hub-button-dark { background: #26211f; color: #fff; }
.hub-button-dark:hover { background: #49362d; }
.hub-button-brand { width: 100%; background: #b91c2b; color: #fff; box-shadow: 0 5px 12px -6px #b91c2b66; }
.hub-button-brand:hover { background: #961525; transform: translateY(-1px); }
.hub-button:disabled { opacity: .65; cursor: wait; transform: none; }
.customer-order-hub :focus-visible { outline: 3px solid #f97316; outline-offset: 3px; }
.history-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.hub-helper { margin: 8px 0 0; color: #78716c; font-size: 11px; line-height: 1.6; }
.hub-results { font-size: 12px; color: #57534e; overflow-y: auto; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: #dfcbb9 transparent; }
.history-results { margin-top: 16px; max-height: 270px; }
.reviews-results { max-height: 230px; }
.hub-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; padding: 18px; border: 1px dashed #ebd9c7; border-radius: 12px; background: #fffbf5; color: #78716c; text-align: center; line-height: 1.6; }
.hub-empty i { font-size: 23px; color: #c76a29; }
.hub-result-row { padding: 12px 0; border-bottom: 1px solid #f0e6dd; }
.hub-result-row:first-child { padding-top: 0; }
.hub-result-row:last-child { border-bottom: 0; padding-bottom: 0; }
.hub-result-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; color: #292524; font-size: 13px; }
.hub-result-top strong { font-weight: 800; }
.hub-result-top .history-number { color: #b91c2b; }
.hub-result-row p { margin: 6px 0 0; line-height: 1.6; white-space: pre-wrap; }
.hub-result-meta { font-size: 11px; color: #78716c; }
.review-stars { color: #a85208; letter-spacing: 2px; white-space: nowrap; }
.review-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #f0e6dd; }
.hub-form-title { margin: 0; color: #292524; font-size: 14px; font-weight: 800; }
.review-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
#review-feedback { margin: 0; padding: 10px 12px; background: #fff5e8; color: #78350f; border-radius: 10px; }
#review-feedback[data-state="error"] { background: #fff1f2; color: #9f1239; }

.order-queue { color: #fff8ef; background: #211c19; border: 1px solid #3a2d25; box-shadow: 0 8px 24px -16px #211c1966; }
#queue-panel, #tracker-block { scroll-margin-top: 110px; }
.queue-heading { padding-bottom: 18px; border-bottom: 1px solid #ffffff14; }
.queue-heading .hub-icon { background: #ffb54c18; border-color: #ffb54c36; color: #ffba54; }
.queue-heading .hub-heading-copy h3 { font-size: 20px; }
.queue-heading .hub-heading-copy p { color: #cabbb0; }
.queue-heading .hub-heading-copy .hub-eyebrow { margin: 0 0 4px; color: #ffba54; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.queue-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.queue-lane { padding: 14px 8px; text-align: center; border: 1px solid #ffffff12; border-radius: 14px; background: #ffffff05; color: #e3d3c7; }
.queue-lane > i { display: block; font-size: 21px; margin-bottom: 7px; }
.queue-lane p { display: grid; place-items: center; min-height: 28px; font-size: 10px; text-transform: uppercase; font-weight: 750; line-height: 1.4; }
.queue-lane > div { margin-top: 8px; font-size: clamp(21px, 2.7cqi, 28px); line-height: 1.2; font-weight: 850; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.queue-lane-cook { background: #f59e0b12; color: #ffd176; border-color: #f59e0b30; }
.queue-lane-ready { background: #10b98112; color: #85e4bf; border-color: #10b98130; }
.queue-ticket { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px; border: 1px solid #ffba5440; border-radius: 14px; background: #ffba5408; }
.queue-ticket > div { min-width: 0; }
.queue-ticket > div:first-child { flex: 1 1 180px; }
.queue-ticket > div:first-child > div { flex-wrap: wrap; }
#tracker-name, #tracker-items, #tracker-list-container { overflow-wrap: anywhere; }
.queue-footnote { display: flex; align-items: flex-start; gap: 7px; margin-top: 16px; color: #cabbb0; font-size: 11px; line-height: 1.6; }
.queue-footnote i { margin-top: 2px; font-size: 15px; }

@container customer-page (min-width: 650px) {
  #menu-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container customer-page (min-width: 820px) {
  .customer-order-hub { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
}
@media (max-width: 380px) {
  .hub-card, .order-queue { padding: 16px; border-radius: 18px; }
  .queue-lanes { gap: 6px; }
  .queue-lane { padding: 12px 5px; }
  .queue-lane p { font-size: 9px; }
  .review-fields { grid-template-columns: minmax(0, 1fr); }
  .hub-button { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-button, #menu-container .menu-card { transition: none; }
}
