/* ARMenu accessibility layer — visible focus rings for keyboard users, respect
   prefers-reduced-motion, and ensure buttons never lose their focus outline. */

/* Only show focus rings for keyboard nav (not mouse clicks) */
:where(button, a, input, textarea, select, [role="button"], [tabindex]):focus:not(:focus-visible) {
  outline: none;
}
:where(button, a, input, textarea, select, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid #e8c58a !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-to-content link for screen readers */
.armenu-skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 10000;
  padding: 8px 14px;
  background: #e8c58a;
  color: #0a0806;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.2s;
}
.armenu-skip-link:focus {
  top: 8px;
}

/* Generic skip link (menu.html) */
.skip-link {position:absolute;left:-9999px;top:0;}
.skip-link:focus {left:12px;top:12px;z-index:9999;padding:8px 14px;background:var(--accent,#e8c58a);color:#0a0806;border-radius:8px;font-weight:700;}

/* ============================================================
   Empty-state (used everywhere lists render zero rows)
   Usage: <div class="empty-state" data-icon="🍽">
            <h3>Nothing yet</h3><p>Add your first dish to get going.</p>
          </div>
   ============================================================ */
.empty-state {
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed rgba(245, 236, 216, 0.14);
  border-radius: 14px;
  background: rgba(245, 236, 216, 0.02);
}
.empty-state::before {
  content: attr(data-icon);
  display: block;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.7;
}
.empty-state h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
}
.empty-state p {
  margin: 0;
  color: rgba(168, 157, 132, 0.9);
  font-size: 13px;
  line-height: 1.5;
}
.empty-state .cta {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 16px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e8c58a, #d4a574);
  color: #0a0806 !important;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* ============================================================
   Skeleton + spinner (unified loading states)
   .sk-line          — one text-line skeleton
   .sk-card          — a card-shaped skeleton
   .sk-shimmer       — animated gradient sweep
   .btn-spinner      — 14px inline spinner for in-button loading
   ============================================================ */
@keyframes armenuShimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.sk-shimmer, .sk-line, .sk-card {
  background: linear-gradient(90deg,
    rgba(245,236,216,0.05) 0%,
    rgba(245,236,216,0.12) 40%,
    rgba(245,236,216,0.05) 80%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  animation: armenuShimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.sk-line  { height: 12px; margin: 8px 0; }
.sk-card  { height: 78px; margin: 10px 0; border-radius: 12px; }

@keyframes armenuSpin { to { transform: rotate(360deg); } }
.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: armenuSpin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

/* ============================================================
   POLISH LAYER — subtle site-wide feel improvements.
   Everything below is additive: only applies where the classes
   or elements already exist. No layout shifts on existing pages.
   ============================================================ */

/* Smoother font rendering across the board */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Selection color that matches the brand accent */
::selection { background: rgba(232, 197, 138, 0.35); color: inherit; }

/* Refined scrollbars on WebKit/Blink (Firefox uses scrollbar-color) */
* { scrollbar-width: thin; scrollbar-color: rgba(232, 197, 138, 0.25) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(232, 197, 138, 0.2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(232, 197, 138, 0.4); background-clip: padding-box; border: 2px solid transparent; }

/* Every button/anchor-button gets a subtle hover lift and press feedback
   unless the page opts out with .no-lift. Preserves whatever background
   or gradient the button already has. */
button:not(.no-lift):not(:disabled),
.btn:not(.no-lift):not(:disabled),
[role="button"]:not(.no-lift):not(:disabled) {
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, filter 0.16s ease-out, opacity 0.16s ease-out;
}
button:not(.no-lift):not(:disabled):hover,
.btn:not(.no-lift):not(:disabled):hover,
[role="button"]:not(.no-lift):not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
button:not(.no-lift):not(:disabled):active,
.btn:not(.no-lift):not(:disabled):active,
[role="button"]:not(.no-lift):not(:disabled):active {
  transform: translateY(0);
  filter: brightness(0.95);
}
button:disabled, .btn:disabled { cursor: not-allowed; opacity: 0.55; }

/* Inputs: soft focus glow */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea, select {
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}
input:focus:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(232, 197, 138, 0.14);
}

/* Toast polish — the pattern is used on menu/portal/admin/staff/kitchen */
.toast {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  border-radius: 12px;
  letter-spacing: 0.01em;
}
@keyframes armenuToastIn {
  0%   { opacity: 0; transform: translate(-50%, 12px) scale(0.98); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.toast.show { animation: armenuToastIn 0.22s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* Cards: any element carrying .card / .dish / .action / .tile that already
   has a background gets a warm hover-lift. Purely additive. */
.card, .dish, .action, .tile, .ticket {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}
.card:hover, .action:hover, .tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

/* Modal / overlay entrance */
@keyframes armenuOverlayIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes armenuSheetUp   { from { opacity: 0; transform: translateY(24px) scale(0.985) } to { opacity: 1; transform: translateY(0) scale(1) } }
.wiz-overlay.on, .overlay.on, .sheet.on, [data-sheet].on {
  animation: armenuOverlayIn 0.18s ease-out both;
}
.wiz-overlay.on > *, .overlay.on > .modal, .sheet.on > .sheet-body {
  animation: armenuSheetUp 0.26s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* Details/summary: rotate a subtle marker when expanded */
details > summary { cursor: pointer; user-select: none; }
details > summary::-webkit-details-marker { display: none; }

/* Chips — canonical utility for anything pill-shaped */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(245, 236, 216, 0.14);
  background: rgba(245, 236, 216, 0.05);
  color: inherit;
  line-height: 1;
  white-space: nowrap;
}
.chip.chip-ok   { background: rgba(125, 216, 125, 0.12); color: #7dd87d; border-color: rgba(125, 216, 125, 0.28); }
.chip.chip-warn { background: rgba(240, 176, 96, 0.12); color: #f0b060; border-color: rgba(240, 176, 96, 0.28); }
.chip.chip-err  { background: rgba(248, 113, 113, 0.12); color: #f87171; border-color: rgba(248, 113, 113, 0.28); }
.chip.chip-brand{ background: rgba(232, 197, 138, 0.15); color: #e8c58a; border-color: rgba(232, 197, 138, 0.32); }

/* Section labels: caps small-mono aesthetic used everywhere */
.section-label, .kicker {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Utility fade-in — respected only when reduced motion is off */
@keyframes armenuFadeIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }
.fade-in { animation: armenuFadeIn 0.35s ease-out both; }

/* Better link default: no cyan-blue underline on the dark theme */
a { color: inherit; }
a[href]:not([class]) { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Print: hide overlays, chrome-only content */
@media print {
  .toast, .wiz-overlay, .overlay, [data-sheet], nav, header, footer { display: none !important; }
  body { background: white !important; color: black !important; }
}
