/* === ICONOS ANIMADOS === */
.wx-ic {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}
.wx-spin { animation: wxspin 18s linear infinite; }
.wx-float { animation: wxf 4s ease-in-out infinite; }
.wx-drops { animation: wxd 900ms linear infinite; }

@keyframes wxspin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}
@keyframes wxf {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
@keyframes wxd {
  0%   { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

/* === ICONO APILADO CON CROSS-FADE (transición de estado) === */
.wx-ic-stack {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}
.wx-ic-stack svg {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: wxFade 16s linear infinite; /* ciclo completo 16s → cambio cada 8s */
}
.wx-ic-stack svg:first-child {
  opacity: 1;
  animation-delay: 0s;
}
.wx-ic-stack svg:last-child {
  animation-delay: 8s; /* mitad del ciclo */
}
@keyframes wxFade {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  90%  { opacity: 0; }
  100% { opacity: 1; }
}

/* === GRID === */
.wxsim-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1024px) {
  .wxsim-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .wxsim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .wxsim-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 12px;
  }
}
@media (max-width: 340px) {
  .wxsim-grid { grid-template-columns: 1fr; }
}

/* === TARJETAS === */
.wx-card {
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 14px;
  min-height: 250px; /* altura estable y redonda */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .15s ease, box-shadow .2s ease;
  width: 100%;
}
.wx-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* Encabezado */
.wx-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.wx-name {
  font-weight: 700;
  font-size: 15px;
}
.wx-desc {
  color: var(--muted-fg);
  font-size: 14px;
  margin-top: 2px;
  min-height: 64px; /* espacio amplio para rotación de frases */
  line-height: 1.3;
  display: flex;
  align-items: center;
}
.wx-temps {
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Encabezado apilado en móvil: icono arriba */
@media (max-width: 760px) {
  .wx-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .wx-ic,
  .wx-ic-stack {
    width: 62px;
    height: 62px;
  }
  .wx-name { font-size: 16px; }
  .wx-desc { min-height: 70px; }
}

/* Fila inferior */
.wx-rows {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Chips */
.wx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  line-height: 1.25;
  border: 1px solid var(--border);
  background: var(--soft);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}
@media (max-width: 480px) {
  .wx-chip { font-size: 12px; padding: 3px 7px; }
}

/* === FECHA DE ACTUALIZACIÓN === */
.wxsim-updated {
  text-align: right;
  font-size: 13px;
  color: var(--muted-fg);
  margin: 6px 4px 12px;
  font-style: italic;
}

/* === TRANSICIÓN SUAVE DEL ROTADOR === */
@media (prefers-reduced-motion: no-preference) {
  .wx-fade { transition: opacity 500ms ease; }
  .wx-fade.is-fading { opacity: 0; }
}
