/* Online ordering (pickup, pay at the stand). Everything here only shows once order.js has
   confirmed the POS feed is live and added .ordering to <body>. */

.order-note[hidden] { display: none; }
.order-note {
  margin: 12px auto 0; display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--negro); color: var(--crema); font-style: italic; font-size: .95rem;
}

/* Price + stepper after each dish name. */
.buy { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; vertical-align: middle; font-size: 1rem; }
.buy .price { font-style: italic; opacity: .72; font-size: .95rem; }
.buy .soldout { font-style: italic; font-size: .9rem; opacity: .6; }
.step {
  display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: 999px; height: 30px;
  opacity: .9;
}
.step button {
  appearance: none; border: 0; background: none; color: inherit; font: inherit; font-size: 1.15rem; line-height: 1;
  width: 30px; height: 28px; cursor: pointer; border-radius: 999px; -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.3,1.6,.5,1);
}
.step button:active { transform: scale(.88); }
.step button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.step .n { min-width: 18px; text-align: center; font-size: .95rem; }
.step:not(.has) .n, .step:not(.has) .minus { display: none; }
.step.has { background: color-mix(in srgb, currentColor 10%, transparent); }

/* Cart bar: slides up once something is in the order. */
.cartbar {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 45;
  transform: translate3d(-50%, 140%, 0); transition: transform .45s cubic-bezier(.2,.8,.2,1);
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 1.05rem;
  display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 999px;
  background: var(--negro); color: var(--crema); box-shadow: 0 10px 30px rgba(20,18,19,.28); white-space: nowrap;
}
.cartbar.show { transform: translate3d(-50%, 0, 0); }
.cartbar .count { background: var(--crema); color: var(--negro); border-radius: 999px; min-width: 26px; padding: 2px 8px; font-size: .9rem; }
.cartbar .go { font-style: italic; }
.cartbar:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; }
html.halloween .cartbar .count { background: var(--hw-orange); }

/* Checkout sheet. */
dialog.checkout {
  border: 0; padding: 0; margin: auto auto 0; width: min(560px, 100%); max-height: 92vh;
  background: var(--crema); color: var(--negro); border-radius: 22px 22px 0 0; overflow: auto;
  font-family: "Newsreader", Georgia, serif;
}
@media (min-width: 640px) { dialog.checkout { margin: auto; border-radius: 22px; } }
dialog.checkout::backdrop { background: rgba(20,18,19,.45); }
dialog.checkout[open] { animation: sheet-up .38s cubic-bezier(.2,.8,.2,1); }
@keyframes sheet-up { from { transform: translate3d(0, 40px, 0); opacity: 0; } to { transform: none; opacity: 1; } }
.co-wrap { padding: 22px 20px 24px; }
.co-head { display: flex; justify-content: space-between; align-items: baseline; }
.co-head h2 { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; font-size: 2rem; }
.co-close { appearance: none; border: 0; background: none; font: inherit; font-size: 1.6rem; cursor: pointer; color: inherit; width: 40px; height: 40px; }
.co-sub { color: #6b6262; font-style: italic; margin-top: 2px; }
.co-lines { list-style: none; margin: 16px 0 6px; }
.co-lines li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e6d8bd; font-size: 1.05rem; text-align: left; }
.co-lines .nm { flex: 1; }
.co-lines .lt { min-width: 64px; text-align: right; }
.co-total { display: flex; justify-content: space-between; font-size: 1.2rem; margin: 12px 0 4px; }
.co-total b { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; font-size: 1.6rem; }
.co-field { margin-top: 14px; text-align: left; }
.co-field label { display: block; margin-bottom: 5px; }
.co-field .opt { color: #6b6262; font-style: italic; font-size: .92rem; }
.co-field input, .co-field textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: inherit; background: #fbf7ee;
  border: 1px solid #d9cbb0; border-radius: 10px; padding: 11px 12px;
}
.co-field textarea { min-height: 70px; resize: vertical; }
.co-field input:focus, .co-field textarea:focus { outline: none; border-color: var(--negro); }
.co-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.co-err { color: #a3341f; font-size: .95rem; margin-top: 4px; min-height: 1.2em; text-align: left; }
.co-send {
  margin-top: 18px; width: 100%; appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 1.15rem; font-style: italic;
  background: var(--negro); color: var(--crema); border-radius: 999px; padding: 14px 18px;
}
.co-send[disabled] { opacity: .7; cursor: progress; }
.co-fine { margin-top: 10px; color: #6b6262; font-size: .9rem; text-align: center; }
/* Optional sign-in: "Continuar con Google" above the form, or the signed-in chip. */
.co-google { margin-top: 16px; text-align: center; }
.co-gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: min(320px, 100%);
  appearance: none; cursor: pointer; font: inherit; font-size: 1.05rem; color: var(--negro);
  background: #fff; border: 1px solid #d9cbb0; border-radius: 999px; padding: 11px 18px;
  box-shadow: 0 1px 0 rgba(20,18,19,.06); transition: transform .2s cubic-bezier(.3,1.6,.5,1), border-color .2s;
}
.co-gbtn:hover { border-color: var(--negro); }
.co-gbtn:active { transform: scale(.98); }
.co-gbtn:focus-visible { outline: 2px solid var(--negro); outline-offset: 3px; }
.co-gbtn .g { width: 20px; height: 20px; flex: none; }
.co-google .co-fine { margin-top: 8px; }
.co-who { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 9px 14px; border: 1px solid #d9cbb0; border-radius: 999px; text-align: left; line-height: 1.2; }
.co-who img { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.co-who > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.co-who .em { color: #6b6262; font-size: .9rem; }
.co-out { appearance: none; border: 0; background: none; font: inherit; font-size: .92rem; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.co-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; text-align: left; font-size: .98rem; color: #4a4243; cursor: pointer; }
.co-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--negro); flex: none; }

.co-done { text-align: center; padding: 10px 0 4px; }
.co-done .code { font-family: "Instrument Serif", serif; font-style: italic; font-size: 4rem; line-height: 1; margin: 10px 0 6px; letter-spacing: .04em; }
.co-done p { font-size: 1.08rem; }
.co-done .co-send { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .cartbar { transition: none; }
  dialog.checkout[open] { animation: none; }
}
