/**
 * WeLoveQR - Global Styles
 * Estilos globales y utilidades reutilizables
 */

/* ==========================================
   IMPORTS
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   RESET Y BASE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f9fafb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   VARIABLES DE COLOR
   ========================================== */
:root {
  --color-primary: #D86425;
  --color-secondary: #34393A;
  --color-light: #E3D6CA;
  --color-primary-dark: #B85420;
  --color-primary-light: #F07935;
}

/* ==========================================
   GRADIENTES GLOBALES
   ========================================== */
.gradient-bg {
  background: linear-gradient(135deg, #f89b4a 0%, #da601f 100%);
}

.gradient-bg-reverse {
  background: linear-gradient(135deg, #B85420 0%, #D86425 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #D86425 0%, #B85420 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   BOTONES GLOBALES
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #D86425 0%, #B85420 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #B85420 0%, #D86425 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(216, 100, 37, 0.3);
}

.btn-secondary {
  background: #34393A;
  color: white;
  border: 2px solid #34393A;
}

.btn-secondary:hover {
  background: #4a5051;
  color: white;
}

.btn-ghost {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   CARDS GLOBALES
   ========================================== */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-border {
  border: 1px solid #e5e7eb;
}

/* ==========================================
   INPUTS Y FORMULARIOS
   ========================================== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #D86425;
  box-shadow: 0 0 0 3px rgba(216, 100, 37, 0.1);
}

.form-input.error {
  border-color: #ef4444;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ==========================================
   BADGES Y ETIQUETAS
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-premium {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
  font-weight: 700;
}

/* ==========================================
   ALERTAS Y NOTIFICACIONES
   ========================================== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* ==========================================
   UTILIDADES DE ESPACIADO
   ========================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
}

/* ==========================================
   ANIMACIONES
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
  border: 3px solid #f3f4f6;
  border-top-color: #D86425;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   OVERLAYS
   ========================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  backdrop-filter: blur(4px);
}

/* ==========================================
   SCROLLBAR PERSONALIZADO
   ========================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #D86425;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #B85420;
}

/* ==========================================
   UTILIDADES DE TEXTO
   ========================================== */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-balance {
  text-wrap: balance;
}

/* ==========================================
   FOCUS VISIBLE
   ========================================== */
:focus-visible {
  outline: 2px solid #D86425;
  outline-offset: 2px;
}

/* ==========================================
   TRANSITIONS GLOBALES
   ========================================== */
.transition-all {
  transition: all 0.3s ease;
}

.transition-fast {
  transition: all 0.15s ease;
}

.transition-slow {
  transition: all 0.5s ease;
}

/* ==========================================
   RESPONSIVE HELPERS
   ========================================== */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}