/* Estilos para skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.12) 37%,
    rgba(255, 255, 255, 0.08) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 4px;
  display: block; /* Añade esto */
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.75rem;
  margin-bottom: 0.25rem;
}

.skeleton-badge {
  width: 60px;
  height: 24px;
  border-radius: 12px;
  display: inline-block; /* Añade esto */
}

.skeleton-button {
  width: 100%;
  height: 40px;
  border-radius: 0.5rem;
}

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

/* Skeleton para móvil - tarjetas */
.skeleton-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem; /* Añade esto para separación */
}

/* ⚠️ ELIMINA o MODIFICA ESTA CLASE - ES EL PROBLEMA */
/* .skeleton-row {
  display: flex;
  align-items: center;
  height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} */

/* En su lugar, usa esto para las filas de skeleton */
.skeleton-row {
  /* Las filas de tabla ya tienen display: table-row por defecto */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Para asegurar que las celdas se muestren correctamente */
.skeleton-row td {
  vertical-align: middle;
  padding: 12px;
}

.skeleton-cell {
  padding: 0 1rem;
}

/* Animaciones */
.skeleton-fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.content-fade-in {
  animation: fadeIn 0.3s ease-in 0.1s both;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Actualizar el skeleton para tener una animación más suave */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.08) 37%,
    rgba(255, 255, 255, 0.05) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.8s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
/* ========== ANIMACIONES SKELETON ========== */

/* Fade-out para skeleton */
.skeleton-fade-out {
  animation: fadeOutSkeleton 0.3s ease-out forwards !important;
}

@keyframes fadeOutSkeleton {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Fade-in para contenido nuevo */
.content-fade-in {
  animation: fadeInContent 0.3s ease-out both;
}

/* Animación escalonada para filas/tarjetas */
.content-fade-in:nth-child(1) { animation-delay: 0.05s; }
.content-fade-in:nth-child(2) { animation-delay: 0.1s; }
.content-fade-in:nth-child(3) { animation-delay: 0.15s; }
.content-fade-in:nth-child(4) { animation-delay: 0.2s; }
.content-fade-in:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación del skeleton loading */
@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ========== FIN ANIMACIONES ========== */
/* Animaciones para scroll infinito */
.animate-fade-in-up {
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación más suave para contenido append */
.content-append {
  animation: fadeInAppend 0.3s ease-out both;
}

@keyframes fadeInAppend {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
