/* Guest menu + cart (uses tokens from theme.css) */

.guestMenuBody {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--color-borderMuted);
}

.headerMain {
  flex: 1;
  min-width: 0;
}

.navGuest {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.langToggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.langToggle button {
  padding: 6px 10px;
  border: none;
  background: var(--color-surface2);
  color: var(--color-muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: not-allowed;
  opacity: 0.85;
}

.langToggle button.isActive {
  background: var(--color-primaryBtn);
  color: #fff;
  opacity: 1;
}

.cafeName {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.tableName {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.menu {
  padding-top: 8px;
}

.category {
  margin: 22px 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.items {
  display: grid;
  gap: 12px;
}

.item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.itemMain {
  padding: 12px 14px 14px;
}

.itemTitle {
  font-weight: 650;
  font-size: 1rem;
}

.itemDesc {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.itemRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.itemPrice {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1rem;
}

.itemPhoto {
  margin: 0;
  max-height: 168px;
  overflow: hidden;
}

.itemPhoto img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 168px;
}

.itemQtyControls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qtyBtn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface2);
  color: var(--color-text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.qtyBtn:active {
  opacity: 0.88;
  transform: scale(0.97);
}

.qtyVal {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
}

/* In-flow cart card */
.cartPanel {
  margin-top: 20px;
}

.cartPanel h3 {
  margin-top: 0;
}

.cartLines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 24px;
  margin: 12px 0;
}

.cartLine {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.cartTotalRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 1rem;
}

.guestNoteLabel {
  display: block;
  margin-bottom: 12px;
}

.guestNoteLabel textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface2);
  color: var(--color-text);
  resize: vertical;
  font: inherit;
}

.cartHr {
  border: none;
  border-top: 1px solid var(--color-borderMuted);
  margin: 16px 0;
}

/* Fixed dock: total + primary CTA */
.cartDock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(11, 12, 16, 0.97) 60%, rgba(11, 12, 16, 0.85));
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.cartDockInner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cartDockTotal {
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 0;
}

.cartDock .btnPrimary {
  flex-shrink: 0;
  width: auto;
  max-width: none;
  min-width: 140px;
  padding: 12px 20px;
  margin-bottom: 0;
}

.statusMsg {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--color-success);
}

.statusMsg.isError {
  color: #f09090;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120%);
  z-index: 60;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-success);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.isVisible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Legacy: same look as .card */
.orderBox {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.btnPrimary,
.btnSecondary {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}

.btnPrimary {
  background: var(--color-primaryBtn);
  border: 1px solid #3d5a8c;
  color: #fff;
  margin-bottom: 8px;
}

.btnPrimary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btnSecondary {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
