/* ==========================================================================
   BLKLUX Food Truck — shared UI components
   Namespaced with .blklux- so they never collide with Astra / Elementor / Woo.
   ========================================================================== */

.blklux-theme {
  background: var(--blklux-onyx);
  color: var(--blklux-ivory);
}

.blklux-theme :where(.blklux-ui, .blklux-screen, .blklux-widget) {
  font-family: var(--blklux-font-body);
  font-size: var(--blklux-fs-md);
  line-height: var(--blklux-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.blklux-ui *,
.blklux-screen *,
.blklux-widget * {
  box-sizing: border-box;
}

/* --- Typography ---------------------------------------------------------- */

.blklux-display {
  font-family: var(--blklux-font-display);
  font-variant-numeric: var(--blklux-nums);
  font-weight: 600;
  line-height: var(--blklux-lh-tight);
  letter-spacing: var(--blklux-track-display);
  text-transform: uppercase;
  color: var(--blklux-ivory);
  margin: 0;
  text-wrap: balance;
}

.blklux-display--gold {
  background: var(--blklux-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blklux-title {
  font-family: var(--blklux-font-display);
  font-variant-numeric: var(--blklux-nums);
  font-weight: 600;
  font-size: var(--blklux-fs-2xl);
  line-height: var(--blklux-lh-snug);
  letter-spacing: 0.01em;
  color: var(--blklux-ivory);
  margin: 0;
  text-wrap: balance;
}

.blklux-lead {
  font-size: var(--blklux-fs-lg);
  color: var(--blklux-ash);
  max-width: 60ch;
  margin: 0;
}

.blklux-muted { color: var(--blklux-ash); }
.blklux-gold { color: var(--blklux-gold); }
.blklux-num { font-variant-numeric: var(--blklux-nums); }
.blklux-small { font-size: var(--blklux-fs-sm); }
.blklux-xs { font-size: var(--blklux-fs-xs); }

.blklux-price {
  font-family: var(--blklux-font-body);
  font-weight: 700;
  font-variant-numeric: var(--blklux-nums);
  color: var(--blklux-gold);
  white-space: nowrap;
}

/* --- Gold rule ------------------------------------------------------------ */

.blklux-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--blklux-gold-gradient-h);
  opacity: 0.6;
}

.blklux-rule--short {
  width: 64px;
}

/* --- Buttons -------------------------------------------------------------- */

.blklux-btn {
  --btn-bg: var(--blklux-gold-gradient);
  --btn-fg: var(--blklux-gold-ink);
  --btn-rim: transparent;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--blklux-s-2);
  min-height: var(--blklux-touch);
  padding: 0 var(--blklux-s-5);
  border-radius: var(--blklux-r-md);
  border: 1px solid var(--btn-rim);
  background: var(--btn-bg);
  background-origin: border-box;
  color: var(--btn-fg);
  font-family: var(--blklux-font-body);
  font-weight: 700;
  font-size: var(--blklux-fs-sm);
  letter-spacing: var(--blklux-track-button);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform var(--blklux-dur-fast) var(--blklux-ease-out), filter var(--blklux-dur) var(--blklux-ease-out), box-shadow var(--blklux-dur) var(--blklux-ease-out), background-color var(--blklux-dur), color var(--blklux-dur);
  box-shadow: 0 12px 24px -14px rgba(212, 165, 72, 0.6);
}

/* Astra's button:hover / a:hover recolour rules must never touch our buttons: restate the variables on hover/focus. */
button.blklux-btn:hover, a.blklux-btn:hover, .blklux-btn:hover, button.blklux-btn:focus, a.blklux-btn:focus, .blklux-btn:focus { color: var(--btn-fg); background: var(--btn-bg); background-origin: border-box; border-color: var(--btn-rim); text-decoration: none; }
.blklux-btn:hover { filter: brightness(1.06); }
.blklux-btn:active { transform: scale(0.97); }
.blklux-btn:focus-visible { outline: 2px solid var(--blklux-gold-light); outline-offset: 3px; }
.blklux-btn[disabled], .blklux-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; filter: none; box-shadow: none; }

.blklux-btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--blklux-gold);
  --btn-rim: var(--blklux-line-strong);
  box-shadow: none;
}
.blklux-btn--outline:hover, .blklux-btn--outline:focus-visible { --btn-bg: rgba(212, 165, 72, 0.1); --btn-fg: var(--blklux-gold-light); --btn-rim: var(--blklux-gold); filter: none; }
/*
 * A flat rim all the way round is the one thing real gold never does. The ring
 * is painted as a gradient into a 1px mask so the button's inside stays
 * transparent over whatever it sits on, and it brightens rather than recolours
 * on hover. Browsers without mask compositing keep the flat --btn-rim above.
 */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .blklux-btn--outline { position: relative; border-color: transparent; }
  .blklux-btn--outline::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--blklux-edge);
    background-size: 230% 100%;
    background-position: 0% 50%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
    transition: background-position 760ms var(--blklux-ease-out), background-image var(--blklux-dur) var(--blklux-ease-out);
  }
  .blklux-btn--outline:hover::before, .blklux-btn--outline:focus-visible::before { background-image: var(--blklux-edge-lit); background-position: 100% 50%; }
  .blklux-btn--outline > * { position: relative; z-index: 1; }
  .blklux-btn--outline:hover, .blklux-btn--outline:focus-visible { --btn-rim: transparent; }
}

.blklux-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--blklux-ivory);
  --btn-rim: transparent;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.blklux-btn--ghost:hover, .blklux-btn--ghost:focus-visible { --btn-bg: rgba(212, 165, 72, 0.08); --btn-fg: var(--blklux-gold-light); filter: none; }

.blklux-btn--danger {
  --btn-bg: transparent;
  --btn-fg: var(--blklux-ember);
  --btn-rim: rgba(217, 101, 79, 0.5);
  box-shadow: none;
}
.blklux-btn--danger:hover { background: rgba(217, 101, 79, 0.1); filter: none; }

.blklux-btn--open {
  --btn-bg: var(--blklux-open);
  --btn-fg: var(--blklux-open-ink);
  box-shadow: none;
}

.blklux-btn--block { width: 100%; }
.blklux-btn--lg { min-height: 56px; font-size: var(--blklux-fs-md); padding: 0 var(--blklux-s-6); border-radius: var(--blklux-r-lg); }
.blklux-btn--sm { min-height: 36px; padding: 0 var(--blklux-s-4); font-size: var(--blklux-fs-xs); }
.blklux-btn--icon { width: var(--blklux-touch); padding: 0; border-radius: var(--blklux-r-pill); }
.blklux-btn .blklux-icon { width: 18px; height: 18px; }
.blklux-btn.blklux-btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.blklux-btn.blklux-btn--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: var(--blklux-gold-ink);
  animation: blklux-spin 0.8s linear infinite;
}
.blklux-btn--outline.blklux-btn--loading::after,
.blklux-btn--ghost.blklux-btn--loading::after { border-color: rgba(212, 165, 72, 0.25); border-top-color: var(--blklux-gold); }

.blklux-segment[aria-busy="true"], .blklux-chips[aria-busy="true"] { position: relative; cursor: progress; }
.blklux-segment[aria-busy="true"] .blklux-chip, .blklux-chips[aria-busy="true"] .blklux-chip { pointer-events: none; }
.blklux-segment[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--blklux-gold), transparent);
  animation: blklux-sweep 900ms linear infinite;
}
@keyframes blklux-sweep { from { transform: translateX(-30%) scaleX(0.4); } to { transform: translateX(30%) scaleX(0.4); } }
@media (prefers-reduced-motion: reduce) {
  .blklux-segment[aria-busy="true"]::after { animation: none; background: var(--blklux-gold); opacity: 0.5; }
}

@keyframes blklux-spin { to { transform: rotate(360deg); } }

/* --- Icons --------------------------------------------------------------- */

.blklux-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}

/* --- Cards --------------------------------------------------------------- */

.blklux-card {
  position: relative;
  background: var(--blklux-charcoal);
  border-radius: var(--blklux-r-lg);
  box-shadow: var(--blklux-elev-1);
  padding: var(--blklux-s-5);
  overflow: hidden;
}

.blklux-card--raised { background: var(--blklux-raised); }
.blklux-card--flush { padding: 0; }
.blklux-card--interactive { cursor: pointer; transition: box-shadow var(--blklux-dur) var(--blklux-ease-out), transform var(--blklux-dur-fast) var(--blklux-ease-out); }
.blklux-card--interactive:hover { box-shadow: var(--blklux-glow); }
.blklux-card--interactive:active { transform: scale(0.99); }
.blklux-card--selected { box-shadow: var(--blklux-glow); }
.blklux-card--selected::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blklux-gold-gradient);
}

.blklux-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--blklux-raised);
  overflow: hidden;
}
.blklux-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}
.blklux-card__media::after {
  /* cinematic vignette: warm light from the top, black at the base */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(8, 8, 8, 0.85) 100%);
  pointer-events: none;
}
.blklux-card__body { padding: var(--blklux-s-4) var(--blklux-s-5) var(--blklux-s-5); }

/* --- Chips / segmented selectors ---------------------------------------- */

.blklux-chips { display: flex; flex-wrap: wrap; gap: var(--blklux-s-2); }

.blklux-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--blklux-s-1);
  min-height: 40px;
  padding: 0 var(--blklux-s-4);
  border-radius: var(--blklux-r-pill);
  border: 1px solid var(--blklux-line);
  background: transparent;
  color: var(--blklux-ivory);
  font-family: var(--blklux-font-body);
  font-weight: 600;
  font-size: var(--blklux-fs-sm);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--blklux-dur), color var(--blklux-dur), border-color var(--blklux-dur), transform var(--blklux-dur-fast);
}
.blklux-chip:hover, button.blklux-chip:hover { border-color: var(--blklux-line-strong); background: rgba(212, 165, 72, 0.06); color: var(--blklux-ivory); }
.blklux-chip.is-selected:hover, button.blklux-chip.is-selected:hover, .blklux-chip[aria-pressed="true"]:hover { background: var(--blklux-gold-gradient); background-origin: border-box; color: var(--blklux-gold-ink); }
.blklux-chip:active { transform: scale(0.96); }
.blklux-chip:focus-visible { outline: 2px solid var(--blklux-gold-light); outline-offset: 2px; }
.blklux-chip[aria-pressed="true"], .blklux-chip.is-selected {
  background: var(--blklux-gold-gradient);
  background-origin: border-box;
  border-color: transparent;
  color: var(--blklux-gold-ink);
}
/* A selected chip keeps its dark-on-gold label in every state: focus is the
   ring, not a colour change, or the label washes out the moment it is clicked. */
.blklux-chip.is-selected:focus, .blklux-chip.is-selected:focus-visible, .blklux-chip.is-selected:active,
.blklux-chip[aria-pressed="true"]:focus, .blklux-chip[aria-pressed="true"]:focus-visible { background: var(--blklux-gold-gradient); background-origin: border-box; color: var(--blklux-gold-ink); }
.blklux-chip[disabled] { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.blklux-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--blklux-r-lg);
  background: var(--blklux-charcoal);
  box-shadow: var(--blklux-rim);
}
.blklux-segment .blklux-chip { border-radius: var(--blklux-r-md); border-color: transparent; min-height: 48px; }

/* --- Status pill --------------------------------------------------------- */

.blklux-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--blklux-r-pill);
  font-size: var(--blklux-fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--blklux-line);
  color: var(--blklux-ash);
  white-space: nowrap;
}
.blklux-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.blklux-status--open { color: var(--blklux-open); border-color: rgba(127, 184, 122, 0.5); }
.blklux-status--open::before { box-shadow: 0 0 0 3px rgba(127, 184, 122, 0.2); }
.blklux-status--closing, .blklux-status--busy { color: var(--blklux-warn); border-color: rgba(224, 176, 74, 0.5); }
.blklux-status--closed, .blklux-status--soldout { color: var(--blklux-ember); border-color: rgba(217, 101, 79, 0.5); }
.blklux-status--gold { color: var(--blklux-gold); border-color: var(--blklux-line-strong); }

/* --- Badges (menu labels) ----------------------------------------------- */

.blklux-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(212, 165, 72, 0.14);
  color: var(--blklux-gold);
  border: 1px solid var(--blklux-line-soft);
}
.blklux-badge--ivory { background: rgba(243, 238, 228, 0.08); color: var(--blklux-ivory); border-color: rgba(243, 238, 228, 0.12); }

/* --- Forms --------------------------------------------------------------- */

.blklux-field { display: grid; gap: 6px; align-content: start; margin: 0 0 var(--blklux-s-4); }
.blklux-label { font-size: var(--blklux-fs-sm); font-weight: 600; color: var(--blklux-ivory); }
.blklux-label__hint { font-weight: 400; color: var(--blklux-ash); margin-left: 6px; }
.blklux-help { font-size: var(--blklux-fs-xs); color: var(--blklux-ash); }
.blklux-error { font-size: var(--blklux-fs-sm); color: var(--blklux-ember); display: flex; gap: 6px; align-items: flex-start; }

.blklux-input,
.blklux-select,
.blklux-textarea {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--blklux-r-md);
  border: 1px solid var(--blklux-line);
  background: var(--blklux-raised);
  color: var(--blklux-ivory);
  font-family: var(--blklux-font-body);
  font-size: 16px; /* prevents iOS zoom */
  line-height: 1.4;
  transition: border-color var(--blklux-dur), box-shadow var(--blklux-dur);
}
/* Every single-line control is exactly 48px — date/time/number pickers included (Chrome gives them extra intrinsic height). */
.blklux-input, .blklux-select { height: 48px; padding-top: 0; padding-bottom: 0; line-height: 46px; box-sizing: border-box; }
/* Date/time pickers: our own gold glyph on the right (like the select chevron); the native indicator is kept,
   invisible, stretched over that corner so the picker still opens on click. */
.blklux-input[type="date"], .blklux-input[type="time"], .blklux-input[type="datetime-local"] { position: relative; line-height: normal; display: flex; align-items: center; padding-right: 44px; background-repeat: no-repeat; background-position: right 14px center; background-size: 18px 18px; }
.blklux-input[type="date"], .blklux-input[type="datetime-local"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d4a548' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.blklux-input[type="time"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d4a548' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.blklux-input::-webkit-calendar-picker-indicator { position: absolute; right: 0; top: 0; width: 48px; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.blklux-input::-webkit-datetime-edit { padding: 0; }
.blklux-input::-webkit-datetime-edit-fields-wrapper { color: var(--blklux-ivory); }
.blklux-textarea { min-height: 112px; padding: 12px 14px; resize: vertical; }
.blklux-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.blklux-fieldset + .blklux-fieldset { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--blklux-line-soft); }
.blklux-legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; font-family: var(--blklux-font-display); font-style: italic; font-size: 21px; font-weight: 500; color: var(--blklux-gold); }
.blklux-legend + * { clear: both; }
.blklux-input::placeholder, .blklux-textarea::placeholder { color: var(--blklux-ash-soft); }
.blklux-input:focus, .blklux-select:focus, .blklux-textarea:focus { outline: none; border-color: var(--blklux-gold); box-shadow: 0 0 0 3px rgba(212, 165, 72, 0.18); }
.blklux-input[aria-invalid="true"], .blklux-select[aria-invalid="true"], .blklux-textarea[aria-invalid="true"] { border-color: var(--blklux-ember); }
.blklux-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d4a548' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.blklux-input-group { position: relative; }
.blklux-input-group .blklux-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--blklux-gold); pointer-events: none; }
.blklux-input-group .blklux-input { padding-left: 44px; }

/* Custom radio / checkbox (option rows in the customizer) */
.blklux-option {
  display: flex;
  align-items: center;
  gap: var(--blklux-s-3);
  min-height: 52px;
  padding: 8px 12px;
  border-radius: var(--blklux-r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--blklux-dur), border-color var(--blklux-dur);
}
.blklux-option:hover { background: rgba(255, 255, 255, 0.03); }
.blklux-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.blklux-option__mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--blklux-line-strong);
  display: grid;
  place-items: center;
  transition: background-color var(--blklux-dur-fast), border-color var(--blklux-dur-fast);
}
.blklux-option--check .blklux-option__mark { border-radius: 6px; }
.blklux-option__mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blklux-gold-ink);
  transform: scale(0);
  transition: transform var(--blklux-dur-fast) var(--blklux-ease-out);
}
.blklux-option--check .blklux-option__mark::after {
  border-radius: 0;
  width: 6px;
  height: 10px;
  background: none;
  border: solid var(--blklux-gold-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
}
.blklux-option input:checked ~ .blklux-option__mark { background: var(--blklux-gold-gradient); border-color: transparent; }
.blklux-option input:checked ~ .blklux-option__mark::after { transform: scale(1); }
.blklux-option--check input:checked ~ .blklux-option__mark::after { transform: rotate(45deg) scale(1); }
.blklux-option input:focus-visible ~ .blklux-option__mark { outline: 2px solid var(--blklux-gold-light); outline-offset: 2px; }
.blklux-option input:checked ~ .blklux-option__label { color: var(--blklux-ivory); }
.blklux-option__label { flex: 1; font-weight: 500; color: var(--blklux-ivory); }
.blklux-option__price { color: var(--blklux-gold); font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--blklux-fs-sm); }
.blklux-option[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

/* Quantity stepper */
.blklux-qty {
  display: inline-grid;
  grid-template-columns: 44px 48px 44px;
  align-items: center;
  border-radius: var(--blklux-r-pill);
  border: 1px solid var(--blklux-line);
  background: var(--blklux-raised);
  overflow: hidden;
}
.blklux-qty button {
  appearance: none;
  height: 44px;
  width: 100%;
  padding: 0; /* theme button padding would push the glyph to the edge */
  margin: 0;
  line-height: 1;
  border: 0;
  background: transparent;
  color: var(--blklux-gold);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
}
.blklux-qty button:hover, .blklux-qty button:focus { background: rgba(212, 165, 72, 0.1); color: var(--blklux-gold); }
.blklux-qty button:active { background: rgba(212, 165, 72, 0.2); }
.blklux-qty button:focus-visible { outline: 2px solid var(--blklux-gold-light); outline-offset: -3px; }
.blklux-qty output { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Layout helpers ------------------------------------------------------ */

.blklux-container { width: 100%; max-width: var(--blklux-container); margin-inline: auto; padding-inline: var(--blklux-gutter); }
.blklux-stack { display: grid; gap: var(--blklux-s-4); }
.blklux-stack--lg { gap: var(--blklux-s-6); }
.blklux-row { display: flex; align-items: center; gap: var(--blklux-s-3); }
.blklux-row--between { justify-content: space-between; }
.blklux-row--wrap { flex-wrap: wrap; }
.blklux-grid { display: grid; gap: var(--blklux-s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.blklux-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- Sheet (mobile bottom sheet) & modal -------------------------------- */

.blklux-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--blklux-z-sheet);
  opacity: 0;
  transition: opacity var(--blklux-dur) var(--blklux-ease-out);
}
.blklux-scrim.is-open { opacity: 1; }

.blklux-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(92dvh, 920px);
  display: flex;
  flex-direction: column;
  background: var(--blklux-charcoal);
  border-radius: var(--blklux-r-xl) var(--blklux-r-xl) 0 0;
  box-shadow: var(--blklux-elev-2);
  z-index: var(--blklux-z-modal);
  transform: translateY(100%);
  transition: transform var(--blklux-dur-slow) var(--blklux-ease-out);
  padding-bottom: env(safe-area-inset-bottom);
  /* Clip to the rounded corners. `clip` (not `hidden`) so the sheet can never become a scroll container:
     focusing an option was scrolling the sheet itself, pushing the header out and leaving a hole under the footer. */
  overflow: hidden;
  overflow: clip;
}
.blklux-sheet.is-open { transform: translateY(0); }
.blklux-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--blklux-line-strong); margin: 10px auto 0; }
.blklux-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--blklux-s-3); padding: var(--blklux-s-3) var(--blklux-s-5); border-bottom: 1px solid var(--blklux-line-soft); }
.blklux-sheet__body { overflow: auto; padding: var(--blklux-s-4) var(--blklux-s-5); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.blklux-sheet__foot { padding: var(--blklux-s-3) var(--blklux-s-5) var(--blklux-s-4); border-top: 1px solid var(--blklux-line-soft); background: var(--blklux-charcoal); }

@media (min-width: 768px) {
  .blklux-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(92vw, 560px);
    max-height: min(88vh, 860px);
    border-radius: var(--blklux-r-xl);
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    transition: transform var(--blklux-dur-slow) var(--blklux-ease-out), opacity var(--blklux-dur) var(--blklux-ease-out);
  }
  .blklux-sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .blklux-sheet__handle { display: none; }
  .blklux-sheet__foot { border-radius: 0 0 var(--blklux-r-xl) var(--blklux-r-xl); }
}

/* The hidden attribute must win over display:flex/grid utilities (empty error boxes were showing). */
.blklux-ui [hidden], .blklux-sheet [hidden], .blklux-ui.blklux-widget [hidden] { display: none !important; }

/* --- Toast --------------------------------------------------------------- */

.blklux-toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--blklux-appnav-h) + env(safe-area-inset-bottom) + 12px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: var(--blklux-z-toast);
  width: min(92vw, 420px);
  pointer-events: none;
}
.blklux-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--blklux-r-md);
  background: var(--blklux-raised);
  box-shadow: var(--blklux-elev-2);
  color: var(--blklux-ivory);
  font-size: var(--blklux-fs-sm);
  font-weight: 600;
  animation: blklux-toast-in var(--blklux-dur-slow) var(--blklux-ease-out);
  pointer-events: auto;
}
.blklux-toast--error { box-shadow: 0 0 0 1px rgba(217, 101, 79, 0.6), var(--blklux-drop); }
.blklux-toast .blklux-icon { color: var(--blklux-gold); }
@keyframes blklux-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Skeleton ------------------------------------------------------------ */

.blklux-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--blklux-raised);
  border-radius: var(--blklux-r-md);
  min-height: 1em;
}
.blklux-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 72, 0.08), transparent);
  transform: translateX(-100%);
  animation: blklux-shimmer 1.4s infinite;
}
@keyframes blklux-shimmer { to { transform: translateX(100%); } }

/* --- Progress timeline (order tracking) ---------------------------------- */

.blklux-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.blklux-timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 0 0 20px; align-items: start; }
.blklux-timeline li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--blklux-line-soft); }
.blklux-timeline li:last-child::before { display: none; }
.blklux-timeline__dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--blklux-line); display: grid; place-items: center; background: var(--blklux-onyx); }
.blklux-timeline__dot .blklux-icon { width: 14px; height: 14px; color: var(--blklux-gold-ink); }
.blklux-timeline li.is-done .blklux-timeline__dot { background: var(--blklux-gold-gradient); border-color: transparent; }
.blklux-timeline li.is-done::before { background: var(--blklux-gold); }
.blklux-timeline li.is-current .blklux-timeline__dot { border-color: var(--blklux-gold); box-shadow: 0 0 0 4px rgba(212, 165, 72, 0.18); }
.blklux-timeline li.is-current .blklux-timeline__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blklux-gold); animation: blklux-pulse 1.6s ease-in-out infinite; }
.blklux-timeline__label { font-weight: 600; color: var(--blklux-ash); }
.blklux-timeline li.is-done .blklux-timeline__label, .blklux-timeline li.is-current .blklux-timeline__label { color: var(--blklux-ivory); }
.blklux-timeline__meta { font-size: var(--blklux-fs-xs); color: var(--blklux-ash); }
@keyframes blklux-pulse { 0%, 100% { transform: scale(0.85); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } }

/* --- Star rating --------------------------------------------------------- */

.blklux-stars { display: inline-flex; gap: 6px; }
.blklux-stars button { appearance: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--blklux-line-strong); width: 44px; height: 44px; display: grid; place-items: center; touch-action: manipulation; }
.blklux-stars button .blklux-icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.blklux-stars button.is-on { color: var(--blklux-gold); filter: drop-shadow(0 0 6px rgba(212, 165, 72, 0.5)); }
.blklux-stars button:focus-visible { outline: 2px solid var(--blklux-gold-light); border-radius: 8px; }

/* --- Reveal (used sparingly; owner adds class in Elementor) -------------- */

.blklux-reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--blklux-ease-out), transform 600ms var(--blklux-ease-out); }
.blklux-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .blklux-reveal { opacity: 1; transform: none; transition: none; } }

/* --- Gold seal (single orchestrated moment: order confirmed) ------------- */

.blklux-seal { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--blklux-gold-gradient); box-shadow: 0 0 0 6px rgba(212, 165, 72, 0.15), 0 0 48px rgba(212, 165, 72, 0.35); animation: blklux-seal 900ms var(--blklux-ease-out) both; }
.blklux-seal .blklux-icon { width: 44px; height: 44px; color: var(--blklux-gold-ink); stroke-width: 2.5; }
@keyframes blklux-seal { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .blklux-seal { animation: none; } }

/* --- Empty state --------------------------------------------------------- */

.blklux-empty { text-align: center; padding: var(--blklux-s-7) var(--blklux-s-4); color: var(--blklux-ash); display: grid; gap: var(--blklux-s-3); justify-items: center; }
.blklux-empty .blklux-icon { width: 40px; height: 40px; color: var(--blklux-gold); stroke-width: 1.25; }
.blklux-empty strong { color: var(--blklux-ivory); font-size: var(--blklux-fs-lg); font-weight: 600; }

/* ==========================================================================
   Page head + action cards — shared by the owner dashboard, the kitchen,
   deliveries, sales & insights and the customer's account, so the same
   pattern means the same thing wherever a person lands.
   ========================================================================== */
.blklux-screenhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--blklux-s-4);
  flex-wrap: wrap;
  margin-bottom: var(--blklux-s-5);
}
.blklux-screenhead__text { min-width: 0; }
.blklux-screenhead__title {
  margin: 0;
  font-family: var(--blklux-font-display);
  font-weight: 600;
  font-size: var(--blklux-fs-2xl);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--blklux-ivory);
}
@media (min-width: 768px) { .blklux-screenhead__title { font-size: var(--blklux-fs-3xl); } }
.blklux-screenhead__sub { margin: 6px 0 0; color: var(--blklux-ash); font-size: var(--blklux-fs-sm); }
.blklux-screenhead__sub .blklux-num { color: var(--blklux-ivory); font-variant-numeric: var(--blklux-nums); }
.blklux-screenhead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.blklux-screenhead__actions .blklux-select { min-height: 40px; }
@media (max-width: 600px) {
  .blklux-screenhead { gap: var(--blklux-s-3); }
  .blklux-screenhead__actions { width: 100%; justify-content: flex-start; }
}

/* Controls that sit directly under the head (stage tabs, date ranges). */
.blklux-screenbar { display: flex; align-items: center; justify-content: space-between; gap: var(--blklux-s-3); flex-wrap: wrap; margin-bottom: var(--blklux-s-4); }
.blklux-screenbar .blklux-segment { flex: 0 1 auto; }


/* --- Quick actions (dashboard) ------------------------------------------ */

.blklux-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--blklux-s-3); }
@media (min-width: 1025px) { .blklux-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blklux-action {
  appearance: none;
  display: grid;
  gap: 6px;
  justify-items: start;
  text-align: left;
  min-height: 92px;
  padding: var(--blklux-s-4);
  border-radius: var(--blklux-r-lg);
  border: 1px solid var(--blklux-line);
  background: var(--blklux-charcoal);
  color: var(--blklux-ivory);
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: box-shadow var(--blklux-dur), transform var(--blklux-dur-fast), border-color var(--blklux-dur);
}
.blklux-action:hover { box-shadow: var(--blklux-glow); }
.blklux-action:active { transform: scale(0.98); }
.blklux-action:focus-visible { outline: 2px solid var(--blklux-gold-light); outline-offset: 2px; }
.blklux-action .blklux-icon { color: var(--blklux-gold); width: 24px; height: 24px; }
.blklux-action strong { font-size: var(--blklux-fs-sm); font-weight: 700; letter-spacing: 0.04em; }
.blklux-action span { font-size: var(--blklux-fs-xs); color: var(--blklux-ash); }
.blklux-action.is-danger { border-color: rgba(217, 101, 79, 0.5); }
.blklux-action.is-danger .blklux-icon { color: var(--blklux-ember); }
.blklux-action.is-active { border-color: var(--blklux-gold); background: rgba(212, 165, 72, 0.08); }


/* --- Quick action cards --------------------------------------------------- */

a.blklux-action, a.blklux-action:hover, a.blklux-action:focus { color: var(--blklux-ivory); text-decoration: none; }
.blklux-action strong, .blklux-action span { text-decoration: none; }
.blklux-action .blklux-icon { transition: color var(--blklux-dur) var(--blklux-ease-out); }
.blklux-action:hover {
  border-color: var(--blklux-line-strong);
  background: var(--blklux-raised);
  box-shadow: var(--blklux-glow);
}
.blklux-action:hover .blklux-icon { color: var(--blklux-gold-light); }
.blklux-action:hover span { color: #c6bfb3; }
.blklux-action.is-danger:hover { border-color: rgba(217, 101, 79, 0.85); box-shadow: 0 0 0 1px rgba(217, 101, 79, 0.7), 0 0 28px -8px rgba(217, 101, 79, 0.45); }
.blklux-action.is-danger:hover .blklux-icon { color: var(--blklux-ember); }
.blklux-action.is-active:hover { background: rgba(212, 165, 72, 0.12); }


/* Motion only where a pointer can hover, and only when motion is welcome. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .blklux-action:hover { transform: translateY(-2px); }
}
@media (hover: none) {
  .blklux-action:hover { box-shadow: var(--blklux-rim); background: var(--blklux-charcoal); transform: none; }
}

/* Cards and action cards never change their text on hover — the surface moves, the words stay put. */
a.blklux-card, a.blklux-card:hover, a.blklux-card:focus, a.blklux-action, a.blklux-action:hover, a.blklux-action:focus { color: var(--blklux-ivory); text-decoration: none; }
a.blklux-card *, a.blklux-action * { text-decoration: none; }
.blklux-card--interactive:hover { border-color: var(--blklux-line-strong); }
.blklux-card--interactive:focus-visible { outline: 2px solid var(--blklux-gold-light); outline-offset: 2px; }

/* --- Stat tiles: today on the owner dashboard, points on the customer account --- */

.blklux-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--blklux-s-3); }
@media (min-width: 768px) { .blklux-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blklux-stat { padding: var(--blklux-s-4) var(--blklux-s-5); background: var(--blklux-charcoal); border-radius: var(--blklux-r-lg); box-shadow: var(--blklux-rim); display: grid; gap: 2px; }
.blklux-stat__label { font-size: var(--blklux-fs-xs); color: var(--blklux-ash); font-weight: 600; }
.blklux-stat__value { font-family: var(--blklux-font-display); font-size: var(--blklux-fs-3xl); font-weight: 600; line-height: 1; color: var(--blklux-ivory); font-variant-numeric: var(--blklux-nums); }
.blklux-stat__value--gold { color: var(--blklux-gold); }
.blklux-stat__delta { font-size: var(--blklux-fs-xs); color: var(--blklux-ash); }



/* A gradient under a transparent border.
 *
 * The filled controls are `border: 1px solid transparent` with a gradient
 * background. The background is clipped to the border box (so the gold reaches
 * the outer edge) but, by default, *sized* to the padding box — two pixels
 * smaller in each direction. The gradient then tiles to cover the difference,
 * laying a one-pixel band of the opposite end of the ramp down the right and
 * bottom edges. At a 12px corner that band reads as a square notch, which is
 * why the buttons looked like their radius had broken. Size the gradient to the
 * box it is painted in and the seam has nothing to fill.
 */
.blklux-btn,
.blklux-chip[aria-pressed="true"],
.blklux-chip.is-selected { background-origin: border-box; }

/* An action that fills the fields above it rather than continuing past them.
 * Given the same 16px the fields use between themselves it reads as one more
 * form row belonging to whatever follows; the larger gap below separates it
 * from the next question while it stays close to what it acts on. */
.blklux-field-action { margin-top: 0; margin-bottom: var(--blklux-s-5); }
