/* Fullscreen warehouse display ============================================= */
.display {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(0.6rem, 1.6vw, 1.25rem);
  text-align: center;
  color: var(--theme-fg, var(--text));
  background: var(--theme-bg, var(--bg));
  transition: background 0.6s ease, color 0.6s ease;
  overflow: hidden;
}

/* Top bar: title + status chrome */
.display__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.display__title {
  font-size: clamp(0.95rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: left;
  opacity: 0.92;
  max-width: 18ch;
}
.display__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* The "icon button" (fullscreen toggle) */
.icon-btn {
  appearance: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.1rem;
  color: var(--theme-fg, var(--text));
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}
.icon-btn:hover {
  background: rgba(0, 0, 0, 0.35);
}
.icon-btn[hidden] {
  display: none;
}

/* Manager (Joe) badge */
.manager-badge {
  align-self: center;
  margin-top: 0.5rem;
  padding: 0.45em 1em;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--theme-fg, var(--text));
  font-size: clamp(0.9rem, 2.4vw, 1.4rem);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.manager-badge[hidden] {
  display: none;
}

/* Centre stage */
.display__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vh, 1.5rem);
}
.display__icon {
  font-size: clamp(5rem, 26vh, 16rem);
  line-height: 1;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}
.display__status {
  font-size: clamp(3rem, 16vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}
/* Big "Epic Brew" status card (the hero) */
.display__figure {
  margin: 0;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.display__card {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}
.display__card[hidden] {
  display: none;
}

/* Emoji/text fallback if a card image is missing */
.display__fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 2vh, 1.5rem);
}
.display__fallback[hidden] {
  display: none;
}
.display__tagline {
  font-size: clamp(1.1rem, 3.4vw, 2.4rem);
  font-weight: 600;
  color: var(--theme-dim, var(--text-dim));
  max-width: 22ch;
  margin: 0;
}

/* Custom message banner (only shown when an admin sets one) */
.display__message {
  margin: 0.5rem auto 0;
  padding: 0.5rem 1.2rem;
  max-width: min(92vw, 60ch);
  font-size: clamp(1rem, 2.6vw, 1.8rem);
  font-weight: 700;
  color: var(--theme-fg, var(--text));
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}
.display__message[hidden] {
  display: none;
}

/* Footer: last-updated */
.display__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  font-weight: 600;
  color: var(--theme-dim, var(--text-dim));
}
.display__footer .dot {
  opacity: 0.5;
}

/* Status-specific motion (kept subtle + respectful of reduced-motion). */
body[data-status="brewing"] .display__icon {
  animation: bob 2.4s ease-in-out infinite;
}
body[data-status="ready"] .display__icon {
  animation: pop 2.8s ease-in-out infinite;
}
body[data-status="empty"] .display__status,
body[data-status="maintenance"] .display__status {
  animation: none;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .display__icon {
    animation: none !important;
  }
}

/* In fullscreen / kiosk the toggle is less useful; keep it discreet. */
:fullscreen .icon-btn {
  opacity: 0.35;
}
:fullscreen .icon-btn:hover {
  opacity: 1;
}

/* Brand lockup (mark + title) */
.display__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.display__mark {
  border-radius: 10px;
  flex-shrink: 0;
}

/* Order queue ============================================================== */
.orders {
  width: 100%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}
.orders[hidden] {
  display: none;
}
.orders__heading {
  margin: 0 0 0.5rem;
  font-size: clamp(0.72rem, 1.6vw, 1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.75;
}
.orders__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.order-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  max-width: 60vw;
  padding: 0.4em 0.95em;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(0.85rem, 2vw, 1.35rem);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.order-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-chip__state {
  font-size: 0.78em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}
.order-chip[data-state="making"] {
  border-color: rgba(255, 255, 255, 0.55);
}
.order-chip[data-state="ready"] {
  color: #1a1205;
  background: var(--epic-gold);
  border-color: var(--epic-gold);
  animation: order-pulse 1.6s ease-in-out infinite;
}
.order-chip[data-state="ready"] .order-chip__state {
  opacity: 0.7;
}
@keyframes order-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 196, 61, 0.55); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 0.6em rgba(245, 196, 61, 0); }
}

/* "Your order is ready" flash overlay */
.order-flash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.order-flash.is-on {
  opacity: 1;
}
.order-flash[hidden] {
  display: none;
}
.order-flash__card {
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(2rem, 8vw, 5rem);
  color: #1a1205;
  background: var(--epic-gold);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: flash-pop 0.4s ease;
}
.order-flash__icon {
  font-size: clamp(3rem, 12vw, 7rem);
  line-height: 1;
}
.order-flash__text {
  font-size: clamp(1.4rem, 5vw, 3rem);
  font-weight: 900;
}
@keyframes flash-pop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .order-chip[data-state="ready"],
  .order-flash__card {
    animation: none;
  }
}

/* Scan-to-open QR (board corner) */
.board-qr {
  position: absolute;
  right: clamp(0.6rem, 1.6vw, 1.25rem);
  bottom: clamp(0.6rem, 1.6vw, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.board-qr[hidden] {
  display: none;
}
.board-qr__img {
  width: clamp(72px, 8vw, 120px);
  height: clamp(72px, 8vw, 120px);
}
.board-qr__img svg {
  display: block;
  width: 100%;
  height: 100%;
}
.board-qr__cap {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1a1205;
}
@media (max-width: 700px) {
  .board-qr {
    display: none;
  }
}
