/* OrderBot: small additions on top of Bootstrap 5.3. No custom JavaScript. */

/* Remote images (restaurant and product photos) are large; never let one
   widen the page. Thumbnails also carry width/height attributes. */
img { max-width: 100%; }

/* htmx indicators (htmx's own indicator styles are disabled via htmx-config). */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }
.htmx-request.picker-form .modal-body { opacity: .6; transition: opacity .2s; }

/* Product picker: an htmx-driven modal (see partials.html). The form uses
   display: contents so its header/body/footer are laid out as direct
   children of .modal-content (needed for scrolling). */
.picker-form { display: contents; }
body:has(#picker-host .modal) { overflow: hidden; }
.picker-img { max-height: 14rem; width: 100%; object-fit: cover; }

/* Confirmation modals work without JavaScript through :target. */
.modal:target { display: block; opacity: 1; background: rgba(0, 0, 0, .5); }
.modal:target .modal-dialog { transform: none; }

/* Menu */
.jump-list { scrollbar-width: thin; }
.product-card .product-thumb { max-width: 7.5rem; min-height: 6rem; }
.product-card.sold-out { opacity: .65; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.min-w-0 { min-width: 0; }
.text-pre-line { white-space: pre-line; }

/* Order column */
@media (min-width: 992px) {
  .order-column { top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
}
#lines-panel { scroll-margin-top: 1rem; }
.accordion-item { scroll-margin-top: 1rem; }

.nav-title { max-width: 50vw; }
.user-menu { min-width: 16rem; }
.bookmarklet { cursor: grab; }

/* Restaurant lists on the start page */
.restaurant-thumb { width: 3rem; height: 3rem; flex-shrink: 0; }
