/* ═══ Nukkad Chat Corner — warm stall glow (chai tapri night, no storm FX) ═══ */

@keyframes corner-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}

@keyframes edge-glow-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

@keyframes card-glow-breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.75; }
}

@keyframes steam-mote-drift {
  0%, 100% { transform: translate(0, 0); opacity: var(--mote-op, 0.35); }
  50% { transform: translate(4px, -14px); opacity: calc(var(--mote-op, 0.35) * 1.4); }
}

/* ── Warm motes — chai steam catching string-lamp light ── */
.steam-mote-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.steam-mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 160, 0.7), rgba(255, 180, 80, 0.2) 60%, transparent 75%);
  filter: blur(0.5px);
  animation: steam-mote-drift var(--mote-dur, 9s) ease-in-out infinite;
  animation-delay: var(--mote-delay, 0s);
}

.steam-mote:nth-child(1) { left: 22%; top: 35%; --mote-op: 0.3; --mote-dur: 10s; }
.steam-mote:nth-child(2) { left: 48%; top: 28%; --mote-op: 0.25; --mote-dur: 8s; --mote-delay: 1.5s; }
.steam-mote:nth-child(3) { left: 68%; top: 40%; --mote-op: 0.28; --mote-dur: 11s; --mote-delay: 3s; }
.steam-mote:nth-child(4) { left: 35%; top: 55%; --mote-op: 0.22; --mote-dur: 9s; --mote-delay: 2s; }
.steam-mote:nth-child(5) { left: 58%; top: 62%; --mote-op: 0.26; --mote-dur: 10s; --mote-delay: 4s; }
.steam-mote:nth-child(6) { left: 78%; top: 50%; --mote-op: 0.2; --mote-dur: 12s; --mote-delay: 0.8s; }

/* ── Corner lamp pools (all warm amber — tapri palette) ── */
.corner-lights {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.corner-light {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(24px);
  animation: corner-pulse var(--cl-dur, 7s) ease-in-out infinite;
  animation-delay: var(--cl-delay, 0s);
}

.corner-light--tl {
  top: -40px;
  left: -40px;
  background: radial-gradient(circle, rgba(255, 190, 100, 0.18), transparent 70%);
  --cl-dur: 8s;
}

.corner-light--tr {
  top: -30px;
  right: -30px;
  background: radial-gradient(circle, rgba(255, 160, 70, 0.14), transparent 70%);
  --cl-delay: 2s;
  --cl-dur: 9s;
}

.corner-light--bl {
  bottom: -50px;
  left: -30px;
  background: radial-gradient(circle, rgba(255, 140, 60, 0.1), transparent 70%);
  --cl-delay: 1s;
  --cl-dur: 10s;
}

.corner-light--br {
  bottom: -40px;
  right: -40px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.12), transparent 70%);
  --cl-delay: 3s;
}

/* ── Vertical edge glow rails ── */
.edge-glow-rails {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.edge-glow {
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 2px;
  border-radius: 2px;
  animation: edge-glow-pulse 6s ease-in-out infinite;
}

.edge-glow--left {
  left: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 184, 77, 0.35) 30%, rgba(255, 200, 120, 0.5) 50%, rgba(255, 184, 77, 0.35) 70%, transparent);
  box-shadow: 0 0 12px rgba(255, 184, 77, 0.25);
}

.edge-glow--right {
  right: 0;
  animation-delay: 3s;
  background: linear-gradient(180deg, transparent, rgba(255, 140, 60, 0.3) 35%, rgba(255, 107, 53, 0.45) 50%, rgba(255, 140, 60, 0.3) 65%, transparent);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.2);
}

/* ── UI section glow accents ── */
.app-header {
  box-shadow:
    0 1px 0 rgba(255, 184, 77, 0.15),
    0 4px 24px rgba(255, 140, 60, 0.08),
    inset 0 1px 0 rgba(255, 220, 150, 0.06);
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 77, 0.4), transparent);
  pointer-events: none;
}

.stats-bar {
  position: relative;
  box-shadow:
    0 0 30px rgba(255, 140, 60, 0.06),
    inset 0 1px 0 rgba(255, 184, 77, 0.08);
}

.stats-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 184, 77, 0.06), transparent 70%);
}

.stat-card {
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 184, 77, 0.1),
    0 0 20px rgba(255, 140, 60, 0.05),
    inset 0 1px 0 rgba(255, 220, 150, 0.04);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 77, 0.35), transparent);
  pointer-events: none;
}

.order-sidebar {
  box-shadow:
    inset 0 0 0 1px rgba(255, 184, 77, 0.12),
    0 0 40px rgba(255, 140, 60, 0.06),
    inset 0 0 60px rgba(255, 184, 77, 0.03);
}

.order-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.08), transparent);
  pointer-events: none;
  border-radius: inherit;
}

.queue-item {
  position: relative;
}

.queue-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 184, 77, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.queue-item:hover::before,
.queue-item--active::before {
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 184, 77, 0.4);
}

.order-card {
  position: relative;
  overflow: visible;
}

.order-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 184, 77, 0.08), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.order-card:hover::before,
.order-card--serving::before {
  opacity: 1;
  animation: card-glow-breathe 4s ease-in-out infinite;
}

.order-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 120, 0.35), transparent);
  pointer-events: none;
  opacity: 0.6;
}

.counter-top {
  position: relative;
}

.counter-top::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 50% 30% at 20% 20%, rgba(255, 190, 100, 0.06), transparent 60%),
    radial-gradient(ellipse 40% 25% at 80% 25%, rgba(255, 107, 53, 0.05), transparent 55%);
}

.ui-hrule {
  position: relative;
}

.ui-hrule::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 8px;
  background: radial-gradient(ellipse, rgba(255, 184, 77, 0.15), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
}

.page-foot {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 184, 77, 0.12),
    0 -8px 40px rgba(255, 140, 60, 0.05);
}

.page-foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 77, 0.45), transparent);
  box-shadow: 0 0 16px rgba(255, 184, 77, 0.2);
}

/* ── Welcome page extras ── */
.welcome-page .tapri-stall-scene::before {
  content: '';
  position: absolute;
  inset: -5%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(255, 190, 100, 0.1), transparent 60%),
    radial-gradient(ellipse 45% 35% at 80% 25%, rgba(255, 107, 53, 0.08), transparent 55%);
  animation: corner-pulse 8s ease-in-out infinite;
}

.welcome-page .welcome-cta {
  box-shadow:
    0 0 0 1px rgba(255, 184, 77, 0.25),
    0 0 24px rgba(255, 140, 60, 0.2),
    0 4px 20px rgba(0, 0, 0, 0.3);
}

.welcome-page .welcome-cta:hover {
  box-shadow:
    0 0 0 1px rgba(255, 184, 77, 0.45),
    0 0 36px rgba(255, 140, 60, 0.35),
    0 6px 28px rgba(0, 0, 0, 0.35);
}

/* ── Reduced motion ── */
.motion-reduced .steam-mote,
.motion-reduced .corner-light,
.motion-reduced .edge-glow,
.motion-reduced .order-card::before {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .steam-mote,
  .corner-light,
  .edge-glow,
  .order-card::before {
    animation: none !important;
  }
}

@media (max-width: 600px) {
  .corner-light {
    width: 120px;
    height: 120px;
  }

  .steam-mote:nth-child(n+5) {
    display: none;
  }
}
