/* Guest order page (menu.purpe.com) and staff orders page (/orders).
   Loaded after styles.css, which supplies the fonts, palette, fields and buttons. */

.order-script {
  font-family: "Pinyon Script", "EB Garamond", cursive;
  font-weight: 400;
  font-size: 4.2rem;
  line-height: 1.1;
  color: var(--gold-dark);
  margin: 0 0 0.25rem;
}

/* Veg / egg / non-veg mark: a dot in a square, in Soraia's colours. */
.mark {
  display: inline-block;
  position: relative;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-radius: 2px;
  margin-right: 0.45rem;
  vertical-align: -0.05rem;
  flex: 0 0 auto;
}

.mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: currentColor;
}

.mark.veg { color: #4f8a2b; }
.mark.egg { color: #e08a1e; }
.mark.nonveg { color: #c0272d; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
  color: rgba(59, 52, 43, 0.8);
  margin: 0 0 0.5rem;
}

.menu-section {
  margin-top: 2rem;
}

.menu-title {
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3rem;
  margin: 0 0 1rem;
}

.menu-group {
  font-style: italic;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 1.2rem 0 0.5rem;
  color: rgba(59, 52, 43, 0.85);
}

.dish-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dish {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(59, 52, 43, 0.1);
}

.dish-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dish-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dish-desc {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
  color: rgba(59, 52, 43, 0.85);
}

.dish-note {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: 0.15rem;
}

.stepper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step-add,
.step-btn {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--gold);
  background: #fffdf8;
  color: var(--gold-dark);
  border-radius: 999px;
  cursor: pointer;
}

.step-add {
  padding: 0.35rem 1rem;
}

.step-btn {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.25rem;
  line-height: 1;
}

.step-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.step-n {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Sticky bar so "Place order" is always in reach on a phone. */
.order-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem -1.5rem 0;
  padding: 0.8rem 1.5rem calc(0.8rem + env(safe-area-inset-bottom));
  background: rgba(246, 237, 220, 0.96);
  border-top: 1px solid var(--hairline);
}

.order-count {
  flex: 1 1 auto;
  font-size: 1rem;
  color: rgba(59, 52, 43, 0.85);
}

.order-bar .btn-gold {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.done-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-size: 1.1rem;
}

.done-list .done-comments {
  margin-top: 0.75rem;
  font-style: italic;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Staff page (/orders): extends the dark DJ theme in songs.css --------- */

.order-card .who {
  font-size: 1.25rem;
  color: var(--dj-text);
}

.order-card .when {
  font-size: 0.9rem;
  color: var(--dj-muted);
  margin-left: 0.5rem;
}

.order-lines {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  font-size: 1.08rem;
}

.order-lines .mark {
  vertical-align: -0.02rem;
}

.order-extra {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.order-extra b {
  color: var(--gold);
  font-weight: 500;
}

/* Jump buttons: stay at the top while scrolling, and take the guest straight
   to a section. scroll-margin keeps a section title clear of the bar. */
.jump {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
  margin: 0 -1.5rem 1rem;
  padding: 0.6rem 1.5rem;
  background: rgba(246, 237, 220, 0.96);
  border-bottom: 1px solid var(--hairline);
}

.jump a {
  flex: 1 1 0;
  text-align: center;
  font-size: 1rem;
  text-decoration: none;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
  background: #fffdf8;
}

.menu-section {
  scroll-margin-top: 4.5rem;
}

html {
  scroll-behavior: smooth;
}

/* Table number from the card's QR code, with a way to change it. */
.table-badge {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: -0.5rem 0 1.5rem;
  font-size: 1.15rem;
}

.table-badge span {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-dark);
}

.order-page select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--field-border);
  border-radius: 3px;
  padding: 0.7rem 0.8rem;
}

/* Staff page: table number first, large, so staff can find the guest. */
.order-card .table {
  display: inline-block;
  font-weight: 600;
  font-size: 1.25rem;
  color: #1d1a16;
  background: var(--gold);
  border-radius: 3px;
  padding: 0 0.5rem;
  margin-right: 0.6rem;
}

/* --- Kitchen tickets (80 mm receipt printer) ------------------------------
   Hidden on screen. When printing, only the tickets show, one per page, so a
   printer set to cut at the end of each page cuts between orders. 72 mm is the
   printable width of 80 mm paper. The printer driver sets the paper size. */
.tickets {
  display: none;
}

@media print {
  @page {
    margin: 0;
  }

  body.dj {
    background: #fff;
    color: #000;
  }

  body.dj main,
  body.dj::before,
  body.dj::after {
    display: none !important;
  }

  .tickets {
    display: block;
  }

  .ticket {
    width: 72mm;
    margin: 0 auto;
    padding: 2mm 1mm 8mm;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    break-after: page;
  }

  .ticket:last-child {
    break-after: auto;
  }

  .ticket p {
    margin: 0;
  }

  .t-table {
    font-size: 28pt;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1mm;
  }

  .t-name {
    font-size: 15pt;
    font-weight: 700;
    margin-top: 2mm !important;
  }

  .t-meta {
    font-size: 10pt;
    margin-bottom: 2mm !important;
  }

  .t-lines {
    list-style: none;
    margin: 0;
    padding: 2mm 0;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
  }

  .t-lines li {
    display: flex;
    gap: 2mm;
    font-size: 13pt;
    line-height: 1.3;
    margin: 1mm 0;
  }

  .t-qty {
    flex: 0 0 auto;
    font-weight: 700;
  }

  .t-dish {
    flex: 1 1 auto;
  }

  .t-extra {
    font-size: 12pt;
    margin-top: 2mm !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

/* Host's note under the title: why the menu is short. Two lines, one per
   sentence; the text shrinks a little on narrow phones to stay on two. */
.curated-note {
  margin: -0.5rem auto 1.75rem;
  text-align: center;
  font-style: italic;
  font-size: clamp(0.85rem, 4.1vw, 1.05rem);
  line-height: 1.5;
  color: rgba(59, 52, 43, 0.82);
}

/* "Call a waiter" sits just under the table, before the menu. */
.waiter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: -0.5rem 0 1.5rem;
}

/* Light gold fill, firm border and a small shadow, so it reads as a button
   without competing with "Place order". */
.btn-waiter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--gold-dark);
  background: rgba(166, 136, 76, 0.12);
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(59, 52, 43, 0.15);
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-waiter:hover {
  background: rgba(166, 136, 76, 0.2);
}

.btn-waiter:active {
  box-shadow: none;
  transform: translateY(1px);
}

.btn-waiter:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.btn-waiter .bell {
  width: 1.5rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  flex: 0 0 auto;
}

.waiter-status {
  font-size: 1rem;
  color: var(--gold-dark);
}

/* Staff page: a waiter call stands out from food orders. */
.order-card.is-waiter {
  border-color: #e58f7c;
}

.order-card .waiter-call {
  margin: 0.45rem 0 0;
  font-size: 1.15rem;
  color: #e58f7c;
}

@media print {
  .t-waiter {
    font-size: 20pt;
    font-weight: 700;
    text-align: center;
    margin-top: 3mm !important;
    border: 2px solid #000;
    padding: 2mm 0;
  }
}

/* Desserts before staff open them: shown, but not orderable yet. */
.closed-note {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.8rem;
  font-style: italic;
  border: 1px dashed var(--gold);
  border-radius: 3px;
  background: rgba(166, 136, 76, 0.08);
}

.menu-section.is-closed .dish {
  opacity: 0.6;
}

/* Staff page: the desserts switch. */
.dj-btn.desserts-open {
  border-color: var(--gold);
  background: var(--gold);
  color: #1d1a16;
}

.stepper[hidden] {
  display: none;
}
