/* New ordering app (/order). Colors come from the entity theme's :root variables. */

body { background: #f0f2f5; font-family: Roboto, sans-serif; padding-bottom: 90px; }

.btn-theme { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
.btn-theme:hover, .btn-theme:focus { background: var(--clr-primary-dark); border-color: var(--clr-primary-dark); color: #fff; }
.btn-theme:disabled { opacity: .55; }

.pending-bar { background: #e8f4fd; color: #0b4f79; border-bottom: 1px solid #bfdff5; padding: 8px 16px; font-size: .9rem; text-align: center; }
.preview-bar { background: #fff8e1; color: #6d4c00; border-bottom: 1px solid #f3e0a6; padding: 8px 16px; font-size: .85rem; text-align: center; }
.preview-bar a { color: #6d4c00; text-decoration: underline; }

#pickup-bar {
  display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 12px 16px; border-bottom: 1px solid #e3e6ea;
}
.pickup-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  background: #fff; color: #222; border: 1px solid #d9dde3; border-radius: 999px;
  padding: 9px 18px; font-size: .95rem; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: border-color .15s, box-shadow .15s;
}
.pickup-pill:hover, .pickup-pill:focus { border-color: var(--clr-primary); box-shadow: 0 2px 8px rgba(0,0,0,.1); outline: none; }
.pickup-pill .fa-shopping-bag { color: var(--clr-primary); }
.pickup-pill-label { color: #6c757d; }
.pickup-pill-label::after { content: '·'; margin-left: 8px; }
#pickup-when { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickup-pill-caret { font-size: .75rem; color: #6c757d; }
.pickup-closed { color: #c0392b; font-weight: 500; }

/* Pickup time sheet: centered on larger screens, a bottom sheet on phones */
#time-modal .modal-header { border-bottom: 0; padding-bottom: 4px; }
.asap-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 2px solid #e3e6ea; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
  transition: border-color .15s;
}
.asap-card:hover { border-color: #c8ccd2; }
.asap-card .fa-bolt { color: var(--clr-primary); font-size: 1.25rem; }
.asap-card span { flex: 1; display: flex; flex-direction: column; }
.asap-card small { color: #6c757d; }
.asap-card .fa-check-circle { color: var(--clr-primary); font-size: 1.2rem; visibility: hidden; }
.asap-card.selected { border-color: var(--clr-primary); }
.asap-card.selected .fa-check-circle { visibility: visible; }
.time-later-title { font-weight: 600; margin-bottom: 4px; }
.time-label { font-size: .75rem; font-weight: 500; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 8px; }
/* Hour first (4 per row on phones, 7 on larger screens), then that hour's times */
.time-hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 576px) { .time-hours { grid-template-columns: repeat(7, 1fr); } }
.time-hour-chip {
  position: relative; background: #fff; color: #222; border: 1px solid #d9dde3; border-radius: 10px;
  padding: 8px 0; font-size: .9rem; transition: border-color .15s;
}
.time-hour-chip:hover { border-color: var(--clr-primary); }
.time-hour-chip.active { border: 2px solid var(--clr-primary); padding: 7px 0; font-weight: 600; }
/* A dot on the hour that holds the chosen time */
.time-hour-chip.has-pick::after {
  content: ''; position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--clr-primary);
}
/* An hour's six 10-minute times: two even rows of 3 on phones, one row of 6 on larger screens */
.time-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 576px) { .time-chips { grid-template-columns: repeat(6, 1fr); } }
.time-chip {
  background: #fff; color: #222; border: 1px solid #d9dde3; border-radius: 999px;
  padding: 8px 0; font-size: .95rem; transition: border-color .15s, background .15s;
}
.time-chip:hover { border-color: var(--clr-primary); }
.time-chip.selected { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; font-weight: 500; }
.time-none { color: #6c757d; }
@media (max-width: 575.98px) {
  /* height:auto + flex-end undo Bootstrap's centering so the sheet sits on the bottom edge */
  #time-modal .modal-dialog { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; min-height: 0; height: auto; justify-content: flex-end; }
  #time-modal .modal-content { border-radius: 18px 18px 0 0; max-height: 85vh; border: 0; }
  #time-modal.fade .modal-dialog { transform: translateY(100%); transition: transform .25s ease-out; }
  #time-modal.show .modal-dialog { transform: none; }
}

/* The sticky bar under the pickup bar: the categories, from its left edge (or the search box,
   opened by the round search button in the bottom right corner) */
#menu-bar {
  position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 4px;
  background: #fff; border-bottom: 1px solid #e3e6ea; padding: 6px 8px 6px 6px;
}
#search-close {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; color: #6c757d; font-size: .95rem;
}
#search-close:hover { background: #e2e5ea; }
#search-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
#menu-search {
  flex: 1; min-width: 0; height: 34px; border: 1px solid #d9dde3; border-radius: 999px;
  padding: 0 14px; font-size: .95rem; outline: none;
}
#menu-search:focus { border-color: var(--clr-primary); }
#menu-search::-webkit-search-cancel-button { -webkit-appearance: none; }   /* our own close button clears it */
.search-empty { text-align: center; color: #6c757d; padding: 40px 16px; }
#category-nav {
  flex: 1; min-width: 0; white-space: nowrap; overflow-x: auto; padding: 2px 4px;
  scrollbar-width: none;            /* still scrolls by swipe or trackpad, without a gray bar */
}
#category-nav::-webkit-scrollbar { display: none; }
#category-nav a { display: inline-block; padding: 4px 12px; margin-right: 4px; border-radius: 16px; color: #333; }
#category-nav a:hover { background: #eef0f3; text-decoration: none; }
#category-nav a { transition: background .2s, color .2s; }
#category-nav a.active { background: var(--clr-primary); color: #fff; }
#category-nav a.active .fa-heart { color: #fff; }

.menu-section { max-width: 1100px; margin: 0 auto; padding-top: 18px; }
.menu-section h3 { font-size: 1.2rem; font-weight: 500; margin: 0 4px 10px; }
.menu-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.menu-item {
  position: relative; background: #fff; border-radius: 8px; padding: 12px 14px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; flex-direction: column;
}
/* Favorites: a heart in the card's corner for a signed-in customer, gold when on (as on today's page) */
.fav-btn {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%; color: #c5c9cf; font-size: 1.05rem;
  transition: color .15s, transform .15s;
}
.fav-btn:hover { transform: scale(1.15); color: var(--clr-favorite-hover, #f9a825); }
.fav-btn.on { color: var(--clr-favorite, #fbc02d); }
.menu-item.has-fav .name { padding-right: 26px; }
.fav-title .fa-heart, #category-nav .fa-heart { color: var(--clr-favorite, #fbc02d); margin-right: 6px; }
.menu-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.menu-item .name { font-weight: 500; }
.menu-item .desc { font-size: .85rem; color: #6c757d; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item .foot { margin-top: auto; display: flex; justify-content: space-between; font-size: .9rem; }
.menu-item.unavailable { opacity: .5; cursor: default; }
.menu-item .left { color: #b36b00; font-size: .8rem; }

#cart-button {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1000;
  background: var(--clr-primary); color: #fff; border: 0; border-radius: 28px;
  padding: 12px 26px; font-size: 1rem; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  white-space: nowrap;   /* left: 50% leaves it half the screen, so a big total wrapped on a small phone */
}
/* Search: a round button in the bottom right corner, level with the cart button */
#search-toggle {
  position: fixed; bottom: 18px; right: 16px; z-index: 1000; width: 48px; height: 48px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: var(--clr-primary); color: #fff; font-size: 1.15rem; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
#search-toggle:hover { background: var(--clr-primary-dark); }

#item-description:empty { display: none; }

/* Guided option steps: one card per option group, one open at a time, choices as chips */
.step { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.step.open { border-color: var(--clr-primary); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.step-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 12px 14px; text-align: left; }
.step-head:focus { outline: none; }
.step-icon { color: #b8bec6; font-size: 1.1rem; }
.step.done .step-icon { color: var(--clr-primary); }
.step-title { font-weight: 600; white-space: nowrap; }
.step-hint { flex: 1; min-width: 0; text-align: right; font-size: .85rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-hint.picked { color: #222; }
.step-caret { font-size: .75rem; color: #6c757d; transition: transform .15s; }
.step.open .step-caret { transform: rotate(180deg); }
.step-body { padding: 0 14px 14px; }
.step-rule { font-size: .8rem; color: #6c757d; margin-bottom: 8px; }
/* Choices in an even grid: 2 per row on phones, 3 on larger screens */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 576px) { .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chip {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 44px; width: 100%;
  background: #fff; color: #222; border: 1px solid #d9dde3; border-radius: 12px; padding: 6px 14px;
  font-size: .95rem; line-height: 1.2; text-align: left; transition: border-color .15s, background .15s;
}
.chip small { font-size: .75rem; color: #6c757d; }
.chip:hover { border-color: var(--clr-primary); }
.chip.selected { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
.chip.selected small { color: rgba(255,255,255,.85); }
.chips-sm .chip { min-height: 34px; padding: 4px 12px; font-size: .9rem; }
.submod { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e6ea; }
.submod-title { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.submod-title small { font-weight: 400; color: #6c757d; }
.step-error { color: #c0392b; font-size: .85rem; margin-top: 8px; }
.step-error:empty { display: none; }
.step-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.step-more { padding: 0; font-size: .85rem; color: var(--clr-primary-dark); text-align: left; }
.step-next { margin-left: auto; border-radius: 999px; padding: 4px 22px; }
/* Item footer stays one row: quantity on the left, the add button fills the rest */
#item-modal .modal-footer { flex-wrap: nowrap; }
#btn-add-item { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pizza builder: crust and sauce as chips; toppings as tiles with the pizza pictures */
.pz-section { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; padding: 12px 14px 14px; margin-bottom: 10px; }
.pz-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pz-section-title { font-weight: 600; }
.pz-section-rule { margin-left: auto; font-size: .8rem; color: #6c757d; }
/* Two toppings per row on phones, three on larger screens, as on the old page */
.pz-toppings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
@media (min-width: 576px) { .pz-toppings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.topping { background: #fff; border: 1px solid #d9dde3; border-radius: 12px; transition: border-color .15s; }
.topping:hover { border-color: var(--clr-primary); }
.topping.on { border-color: var(--clr-primary); box-shadow: inset 0 0 0 1px var(--clr-primary); }
.topping-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; background: none; border: 0; padding: 6px 10px; text-align: left; }
.topping-head:focus { outline: none; }
.topping-head:focus-visible, .pz-half:focus-visible, .pz-amount:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: -2px; }
.topping-check { color: #b8bec6; font-size: 1.05rem; }
.topping.on .topping-check { color: var(--clr-primary); }
.topping-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; font-size: .95rem; }
.topping-name small { font-size: .75rem; color: #6c757d; }
.topping.removed .topping-name > span { text-decoration: line-through; color: #6c757d; }
.topping-name small.topping-replaces { color: #1d5bbf; font-weight: 500; }   /* picking it takes the other half topping off */
/* Where the tiles are wide enough (the large item window), the price sits to the right of the
   name and the tiles are shorter, so the list scrolls less. A phone's tiles are too narrow for
   both on one line, so the price stays under the name there. */
@media (min-width: 992px) {
  .topping-head { min-height: 40px; }
  .topping-name { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; }
  .topping-name > * { grid-column: 1; }
  .topping-name .topping-price { grid-column: 2; grid-row: 1; white-space: nowrap; }
}
.pz-controls { padding: 0 8px 8px; }
.pz-halves { display: flex; gap: 4px; }
.pz-half {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 42px; padding: 0;
  background: #fff; border: 1px solid #d9dde3; border-radius: 8px; transition: border-color .15s;
}
.pz-half:hover { border-color: var(--clr-primary); }
.pz-half:focus, .pz-amount:focus { outline: none; }
.pz-half.active { border-color: var(--clr-primary); box-shadow: inset 0 0 0 1px var(--clr-primary); background: #f6f7f9; }
/* The pizza picture; a half shows only that half, with a dashed outline where the other half is */
.pz-icon { position: relative; display: block; width: 30px; height: 30px; border-radius: 50%; }
.pz-icon img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.pz-left::before, .pz-right::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 1.5px dashed #c8ccd2; border-radius: 50%; }
.pz-left img { clip-path: inset(0 50% 0 0); }
.pz-right img { clip-path: inset(0 0 0 50%); }
.pz-amounts { display: flex; margin-top: 6px; border: 1px solid #d9dde3; border-radius: 999px; overflow: hidden; }
.pz-amount { flex: 1; border: 0; background: #fff; color: #222; font-size: .8rem; padding: 4px 0; }
.pz-amount + .pz-amount { border-left: 1px solid #d9dde3; }
.pz-amount.active { background: var(--clr-primary); color: #fff; }
.qty-picker { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.qty-picker span { min-width: 20px; text-align: center; font-weight: 500; }

.cart-line { border-bottom: 1px solid #eee; padding: 8px 0; }
.cart-line .line-head { display: flex; justify-content: space-between; font-weight: 500; }
.cart-line .line-options { font-size: .85rem; color: #6c757d; }
.cart-line .line-error { font-size: .85rem; color: #c0392b; }
.cart-line .line-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .85rem; }
.cart-line .line-actions .btn { padding: 0 8px; }
#cart-totals td:last-child { text-align: right; }
#cart-totals tr.total td { font-weight: 700; }
.card-field-error { color: #c0392b; font-size: .8rem; min-height: 1em; margin-top: 2px; }
#card-brand { min-width: 48px; justify-content: center; font-size: 1.3rem; }
#tip-buttons .btn.active { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
