/* ================================================================
   SK WELLNESS — SKELETON LOADER
   Agregar al final de /escuela/css/aula-2.css
   ================================================================ */

/* ────────────────────────────────────────────────────────────────
   ANIMACIÓN BASE
   ──────────────────────────────────────────────────────────────── */
@keyframes skSkeletonShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.sk-skel {
  background: linear-gradient(
    90deg,
    rgba(107, 76, 59, .07) 25%,
    rgba(201, 168, 76, .10) 50%,
    rgba(107, 76, 59, .07) 75%
  );
  background-size: 600px 100%;
  animation: skSkeletonShimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

/* ────────────────────────────────────────────────────────────────
   SKELETON DE MÓDULO
   ──────────────────────────────────────────────────────────────── */
.sk-module-skel {
  border-radius: var(--sk-r-xl);
  border: 1px solid var(--sk-border);
  background: linear-gradient(
    160deg,
    rgba(255,255,255,.97) 0%,
    rgba(249,243,227,.60) 100%
  );
  box-shadow: var(--sk-shadow-xs);
  overflow: hidden;
  padding: 24px 28px 28px;
}

/* Cabecera del módulo */
.sk-module-skel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.sk-module-skel__title {
  height: 32px;
  width: 220px;
  border-radius: 10px;
}

.sk-module-skel__chip {
  height: 28px;
  width: 90px;
  border-radius: 999px;
}

/* Grid de tarjetas skeleton */
.sk-module-skel__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Tarjeta skeleton individual */
.sk-card-skel {
  border-radius: var(--sk-r-lg);
  border: 1px solid var(--sk-border);
  background: var(--sk-paper);
  box-shadow: var(--sk-shadow-xs);
  overflow: hidden;
}

.sk-card-skel__cover {
  height: 168px;
  width: 100%;
  border-radius: 0;
}

.sk-card-skel__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-card-skel__chip {
  height: 26px;
  width: 80px;
  border-radius: 999px;
}

.sk-card-skel__title-1 {
  height: 18px;
  width: 100%;
  border-radius: 6px;
}

.sk-card-skel__title-2 {
  height: 18px;
  width: 72%;
  border-radius: 6px;
}

.sk-card-skel__bar {
  height: 6px;
  width: 100%;
  border-radius: 999px;
  margin-top: 12px;
}

/* ────────────────────────────────────────────────────────────────
   SKELETON DEL DASHBOARD (KPI)
   ──────────────────────────────────────────────────────────────── */
.sk-dash.is-loading .sk-dash__pct {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.sk-dash.is-loading .sk-dash__pct::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 120px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(107,76,59,.07) 25%,
    rgba(201,168,76,.10) 50%,
    rgba(107,76,59,.07) 75%
  );
  background-size: 600px 100%;
  animation: skSkeletonShimmer 1.6s ease-in-out infinite;
}

.sk-dash.is-loading .sk-dash__track > span {
  width: 0 !important;
  transition: none;
}

.sk-dash.is-loading .sk-dash__sub,
.sk-dash.is-loading .sk-dash__hint {
  color: transparent;
  position: relative;
  pointer-events: none;
}

.sk-dash.is-loading .sk-dash__sub::after,
.sk-dash.is-loading .sk-dash__hint::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 160px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(107,76,59,.07) 25%,
    rgba(201,168,76,.10) 50%,
    rgba(107,76,59,.07) 75%
  );
  background-size: 600px 100%;
  animation: skSkeletonShimmer 1.6s ease-in-out infinite;
}

/* ────────────────────────────────────────────────────────────────
   ACCESIBILIDAD
   ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sk-skel,
  .sk-card-skel__cover,
  .sk-card-skel__chip,
  .sk-card-skel__title-1,
  .sk-card-skel__title-2,
  .sk-card-skel__bar,
  .sk-module-skel__title,
  .sk-module-skel__chip {
    animation: none !important;
    background: rgba(107, 76, 59, .07) !important;
  }
}