/* e:\Vibe Coding\neuradine\css\animations.css */

/* Smooth slide-up reveal */
@keyframes slideUpReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.reveal-up {
  opacity: 0;
  animation: slideUpReveal 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.reveal-up.animated {
  opacity: 1;
}

.card-glass:hover {
  transform: translateY(-2px);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

/* Staggered entry animation delays */
.reveal-delay-1 { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.3s; }
.reveal-delay-3 { animation-delay: 0.45s; }

@media (prefers-reduced-motion: no-preference) {
  .card-glass,
  .btn-primary,
  .btn-secondary,
  .input-field,
  .nav-link,
  .mobile-nav-item {
    will-change: transform;
  }

  .btn-primary,
  .btn-secondary,
  .toggle-view-btn,
  .toggle-billing-btn,
  .restaurant-card,
  .restaurant-table {
    transform: translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Conic rotation for premium ambient backdrops */
@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.glow-aura-rotate {
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(from 0deg at 50% 50%, var(--primary) 0%, transparent 40%, var(--primary) 60%, transparent 100%);
  animation: rotateGlow 10s linear infinite;
  opacity: 0.12;
  pointer-events: none;
  filter: blur(50px);
}

/* Pulse keyframes for glowing status circles */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0.4);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 16px rgba(255, 107, 43, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0);
  }
}

.pulse-ring-glow {
  animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Drifting particles */
@keyframes drift {
  0% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-15px) translateX(8px); }
  100% { transform: translateY(0px) translateX(0px); }
}

.ambient-particle-1 {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: drift 8s ease-in-out infinite;
}

.ambient-particle-2 {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFF;
  opacity: 0.25;
  animation: drift 12s ease-in-out infinite;
  animation-delay: 2s;
}

/* Futuristic Seating Radar Sweep and Ring Orbits */
@keyframes pulseRadarCore {
  0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 107, 43, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(255, 107, 43, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 107, 43, 0.4); }
}

.radar-core-pulse {
  animation: pulseRadarCore 4s ease-in-out infinite;
}

@keyframes spinOrbitClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinOrbitCounterClockwise {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.orbit-spin-cw {
  animation: spinOrbitClockwise 15s linear infinite;
}

.orbit-spin-ccw {
  animation: spinOrbitCounterClockwise 25s linear infinite;
}

@keyframes radarSweepLine {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep-effect {
  transform-origin: 50% 50%;
  animation: radarSweepLine 6s linear infinite;
}

/* Premium Food Vector Animations & Steams */
.steam-container path {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  stroke: var(--steam-stroke) !important;
  opacity: 0;
  filter: drop-shadow(0 0 8px var(--steam-glow));
}

.steam-line-1 {
  animation: risingSteam 4s linear infinite;
}

.steam-line-2 {
  animation: risingSteam 4s linear infinite;
  animation-delay: 1.5s;
}

.steam-line-3 {
  animation: risingSteam 5s linear infinite;
  animation-delay: 0.7s;
}

@keyframes risingSteam {
  0% {
    stroke-dashoffset: 80;
    transform: translateY(10px) scaleX(0.9);
    opacity: 0;
  }
  15% {
    opacity: 0.65;
  }
  50% {
    transform: translateY(-20px) scaleX(1.2) rotate(3deg);
  }
  80% {
    opacity: 0.25;
  }
  100% {
    stroke-dashoffset: 0;
    transform: translateY(-45px) scaleX(0.8) rotate(-6deg);
    opacity: 0;
  }
}

/* Chopsticks hover wiggles */
.chopsticks-hover-group {
  animation: chopstickHover 5s ease-in-out infinite;
}

@keyframes chopstickHover {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Coriander & pepper sparks drifting */
.ambient-food-effects .leaf-anim-1 {
  animation: leafFloat1 6s ease-in-out infinite;
}

.ambient-food-effects .leaf-anim-2 {
  animation: leafFloat2 7s ease-in-out infinite;
  animation-delay: 1s;
}

.ambient-food-effects .sparkle-anim-1 {
  animation: sparkleGlow 3s ease-in-out infinite;
}

.ambient-food-effects .sparkle-anim-2 {
  animation: sparkleGlow 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.ambient-food-effects .sparkle-anim-3 {
  animation: sparkleGlow 3.5s ease-in-out infinite;
  animation-delay: 1.2s;
}

@keyframes leafFloat1 {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.5; }
  50% { transform: translateY(-15px) rotate(45deg) scale(1.1); opacity: 0.9; }
  100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.5; }
}

@keyframes leafFloat2 {
  0% { transform: translateY(0) rotate(0deg) scale(0.9); opacity: 0.4; }
  50% { transform: translateY(-12px) rotate(-30deg) scale(1.05); opacity: 0.8; }
  100% { transform: translateY(0) rotate(0deg) scale(0.9); opacity: 0.4; }
}

@keyframes sparkleGlow {
  0% { opacity: 0.3; transform: scale(0.9); filter: drop-shadow(0 0 2px var(--primary)); }
  50% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 8px #FFC107); }
  100% { opacity: 0.3; transform: scale(0.9); filter: drop-shadow(0 0 2px var(--primary)); }
}

/* Cross-fade transition classes for active dishes switching */
.food-display-wrapper {
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.food-display-wrapper:not(.active) {
  opacity: 0 !important;
  transform: scale(0.9) rotate(-10deg) !important;
  pointer-events: none !important;
  filter: blur(8px) drop-shadow(0 0 0 rgba(0,0,0,0)) !important;
}

.food-display-wrapper.active {
  opacity: 1 !important;
  transform: scale(1) rotate(0deg) !important;
  pointer-events: auto !important;
  filter: blur(0) drop-shadow(0 15px 40px rgba(0,0,0,0.5)) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEURADINE — PREMIUM ANIMATION ADDITIONS
   Page transitions, reveals, hover effects, smooth scroll, loading states
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── SMOOTH SCROLL ────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ─── PAGE TRANSITION FADE-IN ──────────────────────────────────────────── */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: pageEnter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── SCROLL REVEAL: JS-DRIVEN (reveal-up with IntersectionObserver) ───── */
/* Base state — hidden until observed */
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  /* Remove old animation so JS transition controls it */
  animation: none;
}

.reveal-up.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Delay variants for staggered reveals */
.reveal-up.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-up.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-up.reveal-delay-3 { transition-delay: 0.38s; }

/* ─── CARD HOVER ANIMATIONS ─────────────────────────────────────────────── */
.card-glass {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.28s ease;
}

.card-glass:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 107, 43, 0.15);
  border-color: rgba(255, 107, 43, 0.25);
}

/* Stat tiles */
.stat-tile {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s ease;
}

.stat-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 107, 43, 0.12);
}

/* Zone cards */
.zone-card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
}

.zone-card:hover {
  transform: translateY(-6px);
}

/* ─── BUTTON HOVER EFFECTS ──────────────────────────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease,
              background 0.22s ease,
              filter 0.22s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.22s ease;
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 8px 24px rgba(255, 107, 43, 0.42);
  filter: brightness(1.08);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.btn-secondary {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease,
              background 0.22s ease,
              color 0.22s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 107, 43, 0.5);
}

.btn-secondary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* ─── NAV LINK UNDERLINE HOVER ──────────────────────────────────────────── */
.nav-link {
  position: relative;
  transition: color 0.22s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ─── FOOTER LINK HOVER ─────────────────────────────────────────────────── */
footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

footer a:hover {
  color: var(--primary);
  opacity: 1;
}

/* ─── LOADING SKELETON (for dynamic content loads) ──────────────────────── */
@keyframes shimmerLoad {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 800px 100%;
  animation: shimmerLoad 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 6px);
}

/* ─── INPUT FOCUS TRANSITIONS ───────────────────────────────────────────── */
.input-field {
  transition: border-color 0.22s ease,
              box-shadow 0.22s ease,
              background 0.22s ease;
}

.input-field:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.18);
}

/* ─── INLINE TOAST NOTIFICATION SYSTEM ─────────────────────────────────── */
#nd-toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 48px));
}

.nd-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-body, 'Inter', sans-serif);
  line-height: 1.4;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid transparent;
  pointer-events: all;
  opacity: 0;
  transform: translateX(30px) scale(0.96);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
}

.nd-toast-enter {
  animation: toastSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nd-toast-exit {
  animation: toastSlideOut 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(30px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(30px) scale(0.94); }
}

.nd-toast-error {
  background: rgba(25, 12, 10, 0.92);
  border-color: rgba(220, 60, 40, 0.45);
  color: #ffd5cd;
}

.nd-toast-error .nd-toast-icon {
  color: #ff5540;
  flex-shrink: 0;
}

.nd-toast-success {
  background: rgba(8, 22, 14, 0.92);
  border-color: rgba(46, 204, 113, 0.45);
  color: #c8f5d8;
}

.nd-toast-success .nd-toast-icon {
  color: #2ecc71;
  flex-shrink: 0;
}

.nd-toast-info {
  background: rgba(10, 15, 25, 0.92);
  border-color: rgba(255, 107, 43, 0.35);
  color: var(--text-primary, #f0f0f0);
}

.nd-toast-info .nd-toast-icon {
  color: var(--primary, #ff6b2b);
  flex-shrink: 0;
}

.nd-toast-icon svg {
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nd-toast-msg {
  flex: 1;
  min-width: 0;
}

.nd-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  padding: 0 2px;
  transition: opacity 0.18s ease;
  flex-shrink: 0;
}

.nd-toast-close:hover {
  opacity: 1;
}

/* ─── RESTAURANT CARD HOVER (in restaurants.html inline styles too) ──────── */
.restaurant-card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
}

.restaurant-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 43, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.restaurant-card:hover .restaurant-card-media img {
  transform: scale(1.05);
  transition: transform 0.45s ease;
}

/* ─── SECTION FADE-IN ON SCROLL (polished version) ─────────────────────── */
.home-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-section.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── NAVBAR TRANSITION ─────────────────────────────────────────────────── */
.navbar-container {
  transition: background 0.35s ease,
              box-shadow 0.35s ease,
              backdrop-filter 0.35s ease;
}

/* ─── THEME TOGGLE SPIN ─────────────────────────────────────────────────── */
.theme-toggle {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.12);
}

/* ─── REDUCED MOTION OVERRIDES ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  .reveal-up,
  .home-section,
  .card-glass,
  .btn-primary,
  .btn-secondary,
  .nav-link,
  .stat-tile {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .nd-toast-enter,
  .nd-toast-exit {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }
}
