/* Custom styles for Recetas Kodia */

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

/* Filter buttons */
.filter-btn {
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.dark .filter-btn {
  background: #374151;
  color: #9ca3af;
  border-color: #4b5563;
}

.filter-btn.active,
.filter-btn:hover {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

/* Recipe Card */
.recipe-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dark .recipe-card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Difficulty badges */
.badge-facil {
  background: #dcfce7;
  color: #166534;
}

.dark .badge-facil {
  background: #166534;
  color: #dcfce7;
}

.badge-media {
  background: #fef3c7;
  color: #92400e;
}

.dark .badge-media {
  background: #92400e;
  color: #fef3c7;
}

.badge-dificil {
  background: #fee2e2;
  color: #991b1b;
}

.dark .badge-dificil {
  background: #991b1b;
  color: #fee2e2;
}

/* Allergen icons */
.allergen-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  border-radius: 9999px;
}

.dark .allergen-badge {
  background: #78350f;
  color: #fef3c7;
}

/* Nutrition bar */
.nutrition-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
}

.dark .nutrition-bar {
  background: #374151;
}

.nutrition-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

/* Step number */
.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: white;
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tab buttons */
.tab-btn {
  padding: 12px 16px;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.dark .tab-btn {
  color: #9ca3af;
}

.tab-btn.active {
  color: #10b981;
  border-bottom-color: #10b981;
}

.tab-btn:hover:not(.active) {
  color: #374151;
}

.dark .tab-btn:hover:not(.active) {
  color: #e5e7eb;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast animation */
.toast-show {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* Ingredient checkbox */
.ingredient-check {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.dark .ingredient-check {
  border-color: #4b5563;
}

.ingredient-check:checked {
  background: #10b981;
  border-color: #10b981;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}

.ingredient-item.checked {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Share button */
.share-btn {
  transition: transform 0.2s;
}

.share-btn:active {
  transform: scale(0.95);
}

/* Pulse animation for scan button */
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.3;
  animation: pulse-ring 1.5s infinite;
}

/* Hide scrollbar for filter pills */
.overflow-x-auto::-webkit-scrollbar {
  display: none;
}

.overflow-x-auto {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
