/* ==========================================================================
   LA PESCADERÍA DE ENVIGADO - STITCH DESIGN SYSTEM (LINEN & COBALT MINIMAL)
   Complementary Styles, Transitions, Components & Responsiveness
   ========================================================================== */

:root {
  --color-primary: #053163;
  --color-primary-container: #25487b;
  --color-on-primary: #ffffff;
  --color-secondary: #a14005;
  --color-secondary-container: #fd854a;
  --color-on-secondary: #ffffff;
  --color-tertiary: #003744;
  --color-tertiary-container: #004f61;
  --color-surface: #fff8f4;
  --color-surface-dim: #e3d8d0;
  --color-surface-container-low: #fdf2ea;
  --color-surface-container: #f7ece4;
  --color-surface-container-high: #f1e6de;
  --color-surface-container-highest: #ebe1d9;
  --color-surface-lowest: #ffffff;
  --color-on-surface: #201b16;
  --color-on-surface-variant: #43474f;
  --color-outline: #747780;
  --color-outline-variant: #c3c6d1;
}

/* Base resets & smooth scroll */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-container);
}
::-webkit-scrollbar-thumb {
  background: var(--color-outline-variant);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-outline);
}

/* Material Symbols alignment */
.material-symbols-outlined {
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Elevation shadows */
.elevation-sm {
  box-shadow: 0 2px 8px rgba(37, 72, 123, 0.04), 0 1px 2px rgba(37, 72, 123, 0.02);
}
.elevation-md {
  box-shadow: 0 12px 28px rgba(37, 72, 123, 0.08), 0 4px 8px rgba(37, 72, 123, 0.03);
}
.elevation-lg {
  box-shadow: 0 24px 48px rgba(37, 72, 123, 0.12);
}

/* View transitions (Single Page App views) */
.spa-view {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.spa-view.active-view {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Navigation Drawer */
#mobile-drawer {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
#mobile-drawer.open {
  transform: translateX(0);
}
#mobile-drawer-backdrop {
  transition: opacity 0.3s ease;
}

/* Animated Hamburger Icon */
.hamburger-line {
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
.hamburger-btn.active .line-1 {
  transform: translateY(6px) rotate(45deg);
}
.hamburger-btn.active .line-2 {
  opacity: 0;
}
.hamburger-btn.active .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Modal Dialogs */
.modal-overlay {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.modal-overlay.open {
  display: flex;
  opacity: 1;
}
.modal-card {
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(5, 49, 99, 0.12);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Badge pulse animation */
@keyframes coldPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}
.cold-dot-pulse {
  animation: coldPulse 2s infinite ease-in-out;
}

/* Thermometer display pulse */
.temp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* Print Receipt Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
}
