@tailwind base;
@tailwind components;
@tailwind utilities;

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

/* Fabric.js modal styles integrated inline */

@layer base {
  html {
    font-family: 'Inter', system-ui, sans-serif;
  }
  
  body {
    @apply bg-partner-light text-gray-900;
  }
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --ring: 0 0% 3.9%;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --radius: 0.5rem;
  }
  .dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

@layer components {
  /* Botones estilo Partner */
  .btn-primary {
    @apply bg-partner-blue hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5;
  }
  
  .btn-secondary {
    @apply bg-partner-yellow hover:bg-yellow-500 text-partner-navy px-6 py-3 rounded-lg font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5;
  }
  
  .btn-outline {
    @apply border-2 border-partner-blue text-partner-blue hover:bg-partner-blue hover:text-white px-6 py-3 rounded-lg font-medium transition-all duration-200;
  }
  
  /* Cards estilo Partner */
  .card {
    @apply bg-white rounded-xl shadow-sm border border-gray-100 hover:shadow-md transition-shadow duration-200;
  }
  
  .card-header {
    @apply p-6 border-b border-gray-100;
  }
  
  .card-body {
    @apply p-6;
  }
  
  /* Inputs estilo Partner */
  .input {
    @apply block w-full rounded-lg border-gray-300 shadow-sm focus:border-partner-blue focus:ring-partner-blue focus:ring-opacity-50 transition-colors duration-200;
  }
  
  /* Responsive Table Styles */
  .solicitudes-table {
    @apply w-full border-collapse;
  }
  
  .solicitudes-table th {
    @apply px-3 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50;
  }
  
  .solicitudes-table td {
    @apply px-3 py-4 whitespace-nowrap text-sm text-gray-900 border-b border-gray-200;
  }
  
  @media (max-width: 1024px) {
    .solicitudes-table th,
    .solicitudes-table td {
      @apply px-2 py-2;
    }
    
    .solicitudes-table th {
      @apply text-xs;
    }
    
    .solicitudes-table td {
      @apply text-xs;
    }
  }
  
  @media (max-width: 768px) {
    .solicitudes-table th,
    .solicitudes-table td {
      @apply px-1 py-2;
    }
  }

  /* Gradientes de marca */
  .gradient-partner {
    background: linear-gradient(135deg, #0066CC 0%, #FFC107 100%);
  }
  
  .gradient-partner-dark {
    background: linear-gradient(135deg, #1a2332 0%, #0066CC 100%);
  }
  
  /* Estados de carga */
  .loading-dots {
    @apply inline-flex space-x-1;
  }
  
  .loading-dots span {
    @apply w-2 h-2 bg-partner-blue rounded-full animate-bounce;
  }
  
  .loading-dots span:nth-child(2) {
    animation-delay: 0.1s;
  }
  
  .loading-dots span:nth-child(3) {
    animation-delay: 0.2s;
  }
  
  /* Área de drag & drop */
  .dropzone {
    @apply border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-partner-blue transition-colors duration-200 cursor-pointer;
  }
  
  .dropzone.active {
    @apply border-partner-blue bg-blue-50;
  }
  
  /* Badges de estado */
  .badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-sm font-medium;
  }
  
  .badge-success {
    @apply bg-green-100 text-green-800;
  }
  
  .badge-warning {
    @apply bg-partner-yellow bg-opacity-20 text-yellow-800;
  }
  
  .badge-error {
    @apply bg-red-100 text-red-800;
  }
  
  .badge-info {
    @apply bg-partner-blue bg-opacity-10 text-partner-blue;
  }
  
  /* Sidebar */
  .sidebar {
    @apply bg-white shadow-sm border-r border-gray-200;
  }
  
  .sidebar-item {
    @apply flex items-center px-4 py-3 text-gray-700 hover:bg-gray-50 hover:text-partner-blue transition-colors duration-200 cursor-pointer;
  }
  
  .sidebar-item.active {
    @apply bg-partner-blue bg-opacity-10 text-partner-blue border-r-2 border-partner-blue;
  }
  
  /* Animaciones personalizadas */
  .fade-in {
    animation: fadeIn 0.5s ease-in-out;
  }
  
  .slide-in-right {
    animation: slideInRight 0.3s ease-out;
  }
  
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  /* Scrollbar personalizado */
  .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
  }
  
  .custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
  }
  
  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #0066CC;
    border-radius: 3px;
  }
  
  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
  }

  /* Modal de mockup optimizado */
  .mockup-modal {
    @apply fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50;
    backdrop-filter: blur(4px);
  }

  .mockup-modal-content {
    @apply bg-white rounded-xl shadow-2xl relative;
    max-width: 90vw;
    max-height: 95vh;
    width: 100%;
    height: 100%;
  }

  .mockup-image-container {
    @apply bg-gray-50 flex items-center justify-center;
    min-height: 300px;
  }

  .mockup-image {
    @apply rounded-lg shadow-lg cursor-pointer transition-transform duration-200;
    max-width: calc(100% - 2rem);
    max-height: calc(100% - 80px);
    object-fit: contain;
  }

  .mockup-image:hover {
    transform: scale(1.02);
  }

  .mockup-controls {
    @apply bg-white border-gray-200 flex flex-col overflow-y-auto;
    min-height: 300px;
  }

  .mockup-thumbnail {
    @apply rounded-lg overflow-hidden bg-gray-100 border-2 border-gray-200 cursor-pointer transition-all duration-200;
  }

  .mockup-thumbnail:hover {
    @apply border-partner-blue shadow-md;
    transform: translateY(-2px);
  }

  .mockup-button {
    @apply w-full flex items-center justify-center text-sm font-medium rounded-lg transition-all duration-200 transform;
  }

  .mockup-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .mockup-button:active {
    transform: translateY(0);
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .mockup-modal-content {
      max-width: 95vw;
      max-height: 90vh;
      margin: 1rem;
    }
    
    .mockup-image-container {
      min-height: 200px;
    }
    
    .mockup-controls {
      min-height: 200px;
    }
  }

  @media (max-width: 480px) {
    .mockup-modal-content {
      max-width: 98vw;
      max-height: 95vh;
      margin: 0.5rem;
    }
  }
}

/* Utilidades específicas */
.text-gradient {
  background: linear-gradient(135deg, #0066CC 0%, #FFC107 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dark mode para componentes específicos */
@media (prefers-color-scheme: dark) {
  .card {
    @apply bg-gray-800 border-gray-700;
  }
  
  .sidebar {
    @apply bg-gray-900 border-gray-700;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
} 