/* Proposta Express MW - Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@500;600;700&display=swap');

/* Anti-flash: hide body until branding config is applied by JS */
body.branding-loading {
  opacity: 0;
  pointer-events: none;
}
body.branding-ready {
  opacity: 1;
  transition: opacity 0.18s ease-in;
}

:root {
  /* Colors - Neutral placeholders to avoid flash of wrong brand colors.
     These are overridden immediately by script.js from /api/config. */
  --color-primary: #6b7280;
  --color-primary-container: #4b5563;
  --color-secondary: #6b7280;
  --color-tertiary: #6b7280;
  --color-brand: #6b7280;
  
  --color-surface: #f5faf8;
  --color-surface-container-low: #f0f5f2;
  --color-surface-container: #eaefed;
  --color-surface-container-highest: #dee4e1;
  --color-surface-container-lowest: #ffffff;
  --color-background: #f5faf8;
  
  --color-on-surface: #171d1c;
  --color-on-primary: #ffffff;
  --color-outline-variant: rgba(188, 201, 198, 0.2);

  /* Typography */
  --font-voice: 'Manrope', sans-serif;
  --font-data: 'Inter', sans-serif;

  /* Shadows & Elevations */
  --shadow-ambient: 0px 20px 40px rgba(23, 29, 28, 0.06);
}

body {
  font-family: var(--font-data);
  background-color: var(--color-surface);
  color: var(--color-on-surface);
}

h1, h2, h3, h4, .font-voice {
  font-family: var(--font-voice);
}

/* Glassmorphism Classes */
.glass-panel {
  background-color: rgba(245, 250, 248, 0.85); /* surface at 80%-85% */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 0.5rem; /* DEFAULT / 8px */
}

/* Button Classes */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-container));
  color: var(--color-on-primary);
  border-radius: 9999px; /* full */
  transition: transform 200ms ease-out;
  border: none;
  font-family: var(--font-voice);
  font-weight: 600;
}
.btn-primary:hover {
  transform: scale(1.02);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-outline-variant);
  border-radius: 9999px;
  font-family: var(--font-voice);
  font-weight: 600;
}

/* Inputs (Minimalist bottom line glow) */
.input-minimal {
  background-color: var(--color-surface-container-highest);
  border: none;
  border-bottom: 2px solid var(--color-outline-variant);
  border-radius: 0.25rem; /* sm */
  color: var(--color-on-surface);
  outline: none;
  transition: border-bottom-color 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none; /* No ring */
}

.input-minimal:focus {
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 4px rgba(0, 104, 94, 0.1); /* Subtle 2px glow */
}

/* Product Cards */
.card-product {
  background-color: var(--color-surface-container-lowest);
  border: none; /* No borders allowed */
  border-radius: 8px; /* Avenue Pro standard */
  overflow: hidden;
}

/* Utilities to enforce no-line rule */
.no-border {
  border: none !important;
}

/* Error and Alert States */
.text-error {
  color: #d32f2f !important;
}

.bg-error-subtle {
  background-color: rgba(211, 47, 47, 0.05) !important;
}

.border-error-subtle {
  border-color: rgba(211, 47, 47, 0.2) !important;
}

.bg-primary-subtle {
  background-color: rgba(9, 149, 136, 0.05) !important;
}

.border-primary-subtle {
  border-color: rgba(9, 149, 136, 0.1) !important;
}

/* Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.animate-shake {
  animation: shake 0.2s ease-in-out 0s 2;
}
