/*
 * MULTI-RESTO - Main Application Stylesheet
 * 
 * This file serves as the entry point for Propshaft asset pipeline.
 * Individual stylesheets are loaded per-layout for optimal performance.
 * 
 * Structure:
 * - /backoffice/ : Admin dashboard styles
 * - /landing/    : Public landing page styles  
 * - /front/      : Restaurant menu public pages
 */

/* ===== Shared Variables ===== */
:root {
  /* Brand Colors */
  --primary: #26A69A;
  --primary-dark: #1E8C82;
  --primary-light: #4DB6AC;
  --primary-soft: rgba(38, 166, 154, 0.1);
  
  /* Semantic Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* Neutral Palette */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Background */
  --bg-base: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  
  /* Text */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-inverse: #FFFFFF;
  
  /* Border */
  --border-light: #E5E7EB;
  --border-default: #D1D5DB;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ===== Global Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Turbo Progress Bar ===== */
.turbo-progress-bar {
  background: var(--primary);
  height: 3px;
}

/* ===== Flash Messages ===== */
.flash-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: slideIn 0.3s ease;
}

.flash-message.notice {
  border-left: 4px solid var(--success);
}

.flash-message.alert {
  border-left: 4px solid var(--error);
}

.flash-message.warning {
  border-left: 4px solid var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== Sortable Styles ===== */
.sortable-ghost {
  opacity: 0.4;
  background-color: var(--gray-100);
  transform: scale(0.98);
  transition: all 0.2s ease;
}

.sortable-chosen {
  transform: scale(1.02) rotate(1deg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.sortable-drag {
  transform: scale(1.02) rotate(1deg);
  box-shadow: var(--shadow-xl);
  opacity: 0.95;
}

.sort-handle {
  cursor: grab;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.sort-handle:hover {
  opacity: 1;
}

.sort-handle:active {
  cursor: grabbing;
}

/* ===== Loading States ===== */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
  .no-print {
    display: none !important;
  }
}
