/* Taxio Food console: layout helpers on top of BlazorBlueprint (prefix ff-). */
html, body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: var(--background); color: var(--foreground); }

/* FocusOnNavigate puts the focus on the page's h1 (screen readers); no frame around it. */
h1:focus { outline: none; }

/* Shown by Blazor only after an unhandled error. */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; width: 100%; box-sizing: border-box; z-index: 1000;
    padding: 0.6rem 1.25rem 0.7rem; background: #fff7ed; color: #431407; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.ff-boot { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: #78716c; font-weight: 500; }

.ff-shell__header { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ff-shell__content { padding: 1.5rem; max-width: 1100px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.ff-brand { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; font-weight: 700; font-size: 1.05rem; color: inherit; text-decoration: none; }
.ff-brand img { width: 28px; height: 28px; }

.ff-page-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.ff-page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.ff-spacer { flex: 1; }
.ff-min-w-0 { min-width: 0; }
.ff-show-narrow { display: none; }
.ff-stack { display: flex; flex-direction: column; gap: 1rem; }
.ff-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ff-row--end { justify-content: flex-end; }
.ff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.ff-muted { color: var(--muted-foreground); font-size: 0.875rem; }
.ff-card-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; }
.ff-pt { padding-top: 1.5rem; }
.ff-center { display: flex; justify-content: center; padding: 3rem 0; }

.ff-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ff-table th { text-align: left; font-weight: 600; color: var(--muted-foreground); padding: 0.5rem; border-bottom: 1px solid var(--border); }
.ff-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ff-table tr:last-child td { border-bottom: none; }
.ff-table--clickable tbody tr { cursor: pointer; }
.ff-table--clickable tbody tr:hover { background: var(--accent); }
.ff-num { text-align: right; white-space: nowrap; }

.ff-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; background: var(--muted); color: var(--muted-foreground); }
.ff-badge--warn { background: color-mix(in srgb, #dc2626 14%, transparent); color: #b91c1c; }
.ff-badge--amber { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.ff-badge--ok { background: color-mix(in srgb, #16a34a 15%, transparent); color: #15803d; }

.ff-native-input { height: 2.25rem; padding: 0 0.6rem; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); background: transparent; color: inherit; font: inherit; }
.ff-native-input--narrow { width: 7.5rem; }

.ff-day { display: grid; grid-template-columns: 8rem 1fr; gap: 0.75rem; align-items: start; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.ff-day:last-child { border-bottom: none; }
.ff-day__name { font-weight: 600; padding-top: 0.45rem; }

.ff-allergens { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ff-allergen { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--border); border-radius: 999px;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem; font-size: 0.8rem; cursor: pointer; background: var(--background); color: inherit; }
.ff-allergen:not(:has(.ff-allergen__number)) { padding-left: 0.7rem; }
.ff-allergen:hover { border-color: var(--primary); }
.ff-allergen svg { width: 14px; height: 14px; }
.ff-allergen__number { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem;
    border-radius: 999px; background: var(--muted); font-size: 0.72rem; font-weight: 600; }
.ff-allergen--on { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.ff-allergen--on .ff-allergen__number { background: rgba(0, 0, 0, 0.15); }

.ff-actions { white-space: nowrap; width: 1%; }

/* The menu: a category card with its items as rows (photo or placeholder, name, chips, price, switch). */
.ff-category-header { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.ff-menu-items { display: flex; flex-direction: column; }
.ff-menu-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 0.5rem 1rem; align-items: center;
    padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.ff-menu-item--off .ff-menu-photo, .ff-menu-item--off .ff-menu-item__info { opacity: 0.55; }
.ff-menu-item__name { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ff-menu-item__description { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 0.15rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-menu-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.ff-menu-item__price { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.ff-menu-item-form { margin: 0.75rem 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: color-mix(in srgb, var(--muted) 35%, transparent); }

/* The item form: photo | fields, then sections divided by a line, then the footer. */
.ff-item-form { display: flex; flex-direction: column; gap: 1.25rem; container-type: inline-size; }
.ff-item-form__top { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ff-item-form__photo { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.ff-item-form__fields { display: flex; flex-direction: column; gap: 1rem; }
.ff-item-form__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(8rem, 1fr); gap: 1rem; }
.ff-item-form__footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--border); }
.ff-item-form__footer .ff-row--end { flex-wrap: nowrap; }
}
.ff-form-section { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.ff-form-section__title { font-size: 0.9rem; font-weight: 600; margin: 0; }
.ff-hint { font-size: 0.8rem; color: var(--muted-foreground); margin: 0; }
.ff-hint--error { color: #dc2626; }

/* The address search above the address fields: a list of found addresses under the input. */
.ff-address-search { position: relative; display: flex; flex-direction: column; gap: 0.35rem; max-width: 560px; }
.ff-address-search__label { font-size: 0.875rem; font-weight: 500; }
.ff-address-search__box { display: flex; align-items: center; gap: 0.5rem; padding-left: 0.6rem; border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px); background: var(--background); }
.ff-address-search__box:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }
.ff-address-search__box svg { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }
.ff-address-search__box .ff-native-input { flex: 1; min-width: 0; border: 0; outline: none; padding-left: 0; }
.ff-address-search__list { position: absolute; top: 4.1rem; left: 0; right: 0; z-index: 30; margin: 0; padding: 0.25rem; list-style: none;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--popover, var(--background));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14); }
.ff-address-search__item { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.6rem; border-radius: calc(var(--radius) - 4px);
    font-size: 0.875rem; cursor: pointer; }
.ff-address-search__item svg { width: 15px; height: 15px; color: var(--primary); flex: none; }
.ff-address-search__item:hover, .ff-address-search__item--active { background: var(--muted); }

/* The restaurant's place on the map under its address (Leaflet). */
.ff-address-map { display: flex; flex-direction: column; gap: 0.5rem; }
.ff-address-map__head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 600; }
.ff-address-map__head svg { width: 16px; height: 16px; color: var(--primary); }
.ff-address-map__map { height: 220px; max-width: 560px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden;
    z-index: 0; }
.ff-address-map__map--hidden { display: none; }
/* The console's base img rule (max-width: 100%) would squeeze the map tiles to nothing. */
.ff-address-map__map img { max-width: none !important; max-height: none !important; }
.ff-map-pin span { display: block; width: 22px; height: 22px; border-radius: 999px; background: var(--primary);
    border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); box-sizing: border-box; }
/* Two classes: the base size of .ff-menu-photo comes later in the file. */
.ff-menu-photo.ff-menu-photo--form { width: 200px; height: 150px; }
.ff-menu-photo.ff-menu-photo--form svg { width: 44px; height: 44px; }
.ff-menu-photo { width: 72px; height: 72px; max-width: none; flex-shrink: 0; object-fit: cover; display: block;
    border-radius: var(--radius); background: var(--muted); }
.ff-menu-photo--empty { display: flex; align-items: center; justify-content: center; color: var(--muted-foreground);
    border: 1px dashed var(--border); }
.ff-menu-photo--empty svg { width: 28px; height: 28px; opacity: 0.6; }
.ff-menu-photo--large { width: 160px; height: 120px; }
.ff-menu-photo--large svg { width: 40px; height: 40px; }
.ff-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.ff-chip { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 500; padding: 0.1rem 0.5rem;
    border-radius: 999px; background: var(--muted); color: var(--muted-foreground); }
.ff-chip svg { width: 12px; height: 12px; }
.ff-chip--allergens { background: color-mix(in srgb, #ca8a04 16%, transparent); color: #a16207; }
.ff-add-row { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; margin-top: 0.75rem;
    padding: 0.6rem; border: 1px dashed var(--border); border-radius: var(--radius); background: transparent;
    color: var(--muted-foreground); font: inherit; font-size: 0.875rem; cursor: pointer; }
.ff-add-row:hover { border-color: var(--primary); color: var(--foreground); }
.ff-add-row svg { width: 16px; height: 16px; }
.ff-empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1.5rem 0; text-align: center; color: var(--muted-foreground); }

/* The photo in the item form: a click on it opens the file dialog. */
.ff-photo-picker { position: relative; display: inline-block; cursor: pointer; border-radius: var(--radius); }
.ff-photo-picker__label { position: absolute; left: 0.4rem; bottom: 0.4rem; display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; background: rgba(0, 0, 0, 0.6); color: #fff; }
.ff-photo-picker__label svg { width: 14px; height: 14px; }
.ff-photo-picker:hover .ff-menu-photo { outline: 2px solid var(--primary); outline-offset: 2px; }
.ff-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.ff-options { display: flex; flex-direction: column; gap: 0.5rem; }
.ff-option-row { display: grid; grid-template-columns: minmax(10rem, 1fr) 8rem auto auto; gap: 0.5rem; align-items: center; }

.ff-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--muted); }
.ff-auth__card { width: min(420px, 100%); }
.ff-auth__toolbar { display: flex; justify-content: flex-end; gap: 0.5rem; margin-bottom: 0.75rem; }

/* Customer preview: the restaurant's page the way customers see it, in a column of a phone-friendly width. */
.ff-preview-note { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.ff-preview-note svg { width: 16px; height: 16px; flex: none; }
.ff-preview-hidden__title { font-weight: 600; color: var(--foreground); margin: 0; }
.ff-preview-hidden__reasons { margin: 0; padding-left: 1.25rem; text-align: left; }
.ff-preview { max-width: 860px; display: flex; flex-direction: column; gap: 1.5rem; }
.ff-preview__hero { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.5rem; border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.5); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%); }
.ff-preview__name { font-size: 1.75rem; font-weight: 700; margin: 0; line-height: 1.2; }
.ff-preview__description { margin: 0; color: var(--muted-foreground); }
.ff-preview__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; font-size: 0.875rem; }
.ff-preview__meta > span { display: inline-flex; align-items: center; gap: 0.3rem; }
.ff-preview__meta svg, .ff-preview__week summary svg { width: 14px; height: 14px; }
.ff-preview__week summary { cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; }
.ff-preview__week table { margin-top: 0.5rem; border-collapse: collapse; font-size: 0.875rem; }
.ff-preview__week th { text-align: left; font-weight: 500; padding: 0.15rem 1.5rem 0.15rem 0; color: var(--muted-foreground); }
.ff-preview__today th, .ff-preview__today td { font-weight: 700; color: var(--foreground); }
.ff-preview__tabs { display: flex; gap: 0.5rem; position: sticky; top: 0; z-index: 1; padding: 0.5rem 0; background: var(--background); }
.ff-preview__tab { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 1rem; border-radius: 999px;
    border: 1px solid var(--border); background: transparent; color: var(--foreground); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.ff-preview__tab svg { width: 16px; height: 16px; }
.ff-preview__tab--on { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.ff-preview__category { display: flex; flex-direction: column; gap: 0.75rem; }
.ff-preview__category-name { font-size: 1.25rem; font-weight: 700; margin: 0; }
.ff-preview__category .ff-muted { margin: -0.5rem 0 0; }
.ff-preview__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: start; }
.ff-preview-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.ff-preview-item--open { grid-column: 1 / -1; border-color: var(--primary); }
.ff-preview-item__summary { width: 100%; display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.9rem; border: 0;
    background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ff-preview-item__summary:hover { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.ff-preview-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.ff-preview-item__name { font-weight: 600; }
.ff-preview-item__description { font-size: 0.85rem; color: var(--muted-foreground);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-preview-item__price { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; font-weight: 700; }
.ff-preview-item__photo { width: 88px; height: 88px; flex: none; object-fit: cover; border-radius: var(--radius); }
.ff-preview-item__chevron { flex: none; width: 16px; height: 16px; color: var(--muted-foreground); }
.ff-preview-item--off .ff-preview-item__name, .ff-preview-item--off .ff-preview-item__description,
.ff-preview-item--off .ff-preview-item__photo { opacity: 0.5; }
.ff-preview-item--open .ff-preview-item__summary .ff-preview-item__photo { display: none; }
.ff-preview-item__details { display: flex; flex-direction: column; gap: 1rem; padding: 0 0.9rem 0.9rem; }
.ff-preview-item__photo-large { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius); }
.ff-preview-group { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.ff-preview-group__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ff-preview-group__name { font-weight: 600; font-size: 0.9rem; }
.ff-preview-group__options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ff-preview-group__options li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; font-size: 0.9rem; }
.ff-preview-group__options li + li { border-top: 1px dashed var(--border); }
.ff-preview-group__option--off > :first-child { text-decoration: line-through; color: var(--muted-foreground); }

/* Orders: three columns of running orders (new, preparing, ready), the history below each other. */
.ff-orders__tabs { position: static; padding: 0; background: none; }
.ff-orders__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem;
    border-radius: 999px; background: var(--muted); color: var(--foreground); font-size: 0.75rem; font-weight: 700; }
.ff-preview__tab--on .ff-orders__count { background: rgba(0, 0, 0, 0.15); color: inherit; }
.ff-orders__board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.ff-orders__column { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; border-radius: calc(var(--radius) * 1.5);
    background: color-mix(in srgb, var(--muted) 40%, transparent); border-top: 3px solid var(--border); min-height: 8rem; }
.ff-orders__column--new { border-top-color: var(--primary); }
.ff-orders__column--accepted { border-top-color: #2563eb; }
.ff-orders__column--ready { border-top-color: #16a34a; }
.ff-orders__column-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 1rem; font-weight: 700; }
.ff-orders__empty { text-align: center; padding: 1rem 0; }
.ff-orders__history { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.75rem; align-items: start; }
.ff-order { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card); }
.ff-order--fresh { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.ff-order--late { border-color: #dc2626; }
.ff-order__head { display: flex; align-items: center; gap: 0.5rem; }
.ff-order__number { font-size: 1.25rem; font-weight: 800; }
.ff-order__customer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-weight: 600; }
.ff-order__customer a { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 500; color: inherit; }
.ff-order__customer svg, .ff-order__note svg { width: 14px; height: 14px; flex: none; }
.ff-order__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
/* A line: the pieces, the name (its options and note under it) and the price, each in its own column. */
.ff-order__line { display: grid; grid-template-columns: 1.9rem minmax(0, 1fr) auto; column-gap: 0.4rem; row-gap: 0.15rem; align-items: baseline; }
.ff-order__qty { font-weight: 700; }
.ff-order__name { font-weight: 500; overflow-wrap: anywhere; }
.ff-order__price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ff-order__options { grid-column: 2 / -1; font-size: 0.85rem; color: var(--muted-foreground); }
.ff-order__note { display: flex; align-items: flex-start; gap: 0.35rem; font-size: 0.85rem; padding: 0.35rem 0.5rem; border-radius: calc(var(--radius) - 2px);
    background: color-mix(in srgb, #ca8a04 14%, transparent); }
.ff-order__lines .ff-order__note { grid-column: 2 / -1; margin-top: 0.15rem; }
.ff-order__total { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.ff-order__total-label { display: flex; flex-direction: column; line-height: 1.25; }
.ff-order__total-label .ff-muted { font-size: 0.75rem; }
.ff-order__total-price { font-size: 1.15rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ff-order__main { flex: 1 1 100%; }
.ff-order__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ff-order__actions--column { flex-direction: column; align-items: stretch; }
.ff-order__accept-label { width: 100%; font-size: 0.8rem; font-weight: 600; color: var(--muted-foreground); }
.ff-order__minutes { display: flex; flex-wrap: wrap; gap: 0.35rem; }

@media (max-width: 900px) {
    .ff-orders__board { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ff-preview__items { grid-template-columns: 1fr; }
    .ff-preview__hero { padding: 1rem; }
    .ff-preview__name { font-size: 1.4rem; }
    .ff-preview-item__photo { width: 72px; height: 72px; }
    .ff-shell__content { padding: 1rem; }
    /* The header keeps only the icons on a phone (the user's name and the button texts do not fit). */
    .ff-hide-narrow { display: none; }
    .ff-show-narrow { display: block; }
    /* The price, the switch and the buttons go under the name. */
    .ff-menu-item { grid-template-columns: 56px minmax(0, 1fr); }
    .ff-menu-item .ff-menu-photo { width: 56px; height: 56px; }
    .ff-menu-item__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .ff-menu-item-form { padding: 1rem; }
    .ff-item-form__top { grid-template-columns: 1fr; }
    .ff-item-form__photo { align-items: stretch; }
    .ff-menu-photo.ff-menu-photo--form { width: 100%; height: 180px; }
    .ff-item-form__row { grid-template-columns: 1fr; }
    .ff-page-header h1 { font-size: 1.25rem; }
    .ff-day { grid-template-columns: 1fr; }
    /* The name on its own line, the surcharge, availability and delete below it. */
    .ff-option-row { grid-template-columns: 6rem 1fr auto; }
    .ff-option-row > :first-child { grid-column: 1 / -1; }
}

/* New orders waiting, in the header of every restaurant page; the chime switch beside it. */
.ff-new-orders { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border-radius: 999px;
    background: var(--primary); color: var(--primary-foreground); font-size: 0.85rem; font-weight: 700; text-decoration: none;
    white-space: nowrap; animation: ff-pulse 1.6s ease-in-out infinite; }
.ff-new-orders svg { width: 16px; height: 16px; }
@keyframes ff-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .ff-new-orders { animation: none; } }
.ff-sound--blocked { color: #b45309; }
.ff-nav-badge { margin-left: auto; min-width: 1.25rem; padding: 0 0.35rem; border-radius: 999px; background: var(--primary);
    color: var(--primary-foreground); font-size: 0.7rem; font-weight: 700; line-height: 1.25rem; text-align: center; }

/* Taking orders now, or paused (the kitchen is too busy). */
.ff-pause { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
    margin: 0 0 0.75rem; padding: 0.65rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--border); }
.ff-pause--on { background: color-mix(in srgb, #16a34a 7%, var(--background)); }
.ff-pause--paused { background: color-mix(in srgb, #f59e0b 14%, var(--background)); border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); }
.ff-pause__state { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.ff-pause__state svg { width: 18px; height: 18px; }
.ff-pause--on .ff-pause__state svg { color: #16a34a; }
.ff-pause--paused .ff-pause__state svg { color: #b45309; }
.ff-pause__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.ff-pause__actions .ff-muted { font-size: 0.85rem; margin-right: 0.15rem; }

/* The logo and the cover: a preview of the customers' card beside the pickers. */
.ff-mb { margin-bottom: 1rem; }
.ff-images { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.ff-images__preview { flex: 0 1 300px; min-width: 240px; border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); overflow: hidden;
    background: var(--card); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.ff-images__cover { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #f97316, #b45309); }
.ff-images__cover img { width: 100%; height: 100%; object-fit: cover; }
.ff-images__body { position: relative; display: flex; flex-direction: column; gap: 0.15rem; padding: 2.1rem 0.9rem 0.9rem; }
.ff-images__logo { position: absolute; top: -28px; left: 0.9rem; width: 56px; height: 56px; border-radius: 999px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background: var(--card); border: 3px solid var(--card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); color: var(--muted-foreground); }
.ff-images__logo img { width: 100%; height: 100%; object-fit: cover; }
.ff-images__logo svg { width: 24px; height: 24px; }
.ff-images__pickers { flex: 1 1 260px; display: flex; flex-direction: column; gap: 1.25rem; }
.ff-images__picker { display: flex; flex-direction: column; gap: 0.4rem; }
.ff-file-button { display: inline-flex; align-items: center; gap: 0.4rem; height: 2.25rem; padding: 0 0.9rem; border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; font-weight: 500; cursor: pointer; background: var(--background); }
.ff-file-button:hover { background: var(--muted); }
.ff-file-button svg { width: 16px; height: 16px; }
.ff-file-button--busy { opacity: 0.6; cursor: progress; }
.ff-file-button--busy svg { animation: ff-spin 1s linear infinite; }
@keyframes ff-spin { to { transform: rotate(360deg); } }

/* The item form: its own width decides (the side menu and the card take a part of the window): the photo goes above the
   fields when they would get too little room, the name and the price stack when even they do not fit side by side. */
@container (max-width: 620px) {
    .ff-item-form__top { grid-template-columns: 1fr; }
    .ff-item-form__photo { align-items: stretch; }
    .ff-menu-photo.ff-menu-photo--form { width: 100%; height: 180px; }
    .ff-item-form__photo .ff-photo-picker { display: block; }
}
@container (max-width: 420px) {
    .ff-item-form__row { grid-template-columns: 1fr; }
