/*
 * «Siguiendo» de la nueva web (lib/nueva/pages/siguiendo).
 * Diseño: docs/web-usuarios/lienzo4/Siguiendo.dc.html (teléfono) y
 * SiguiendoEscritorio.dc.html (desde 768 px).
 * Solo variables: los valores viven en tokens.css.
 *
 * El HTML trae los tres estados (sin sesión, con sesión y cuenta de
 * organización) y siguiendo.js alterna `hidden` entre ellos. Los caminos de
 * cuenta usan las clases de la hoja de cuenta (base.css, `.nw-sheet__*`).
 */

.nw-siguiendo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--nw-page-max);
  margin: 0 auto;
  padding: 18px 16px 28px;
}
/* `hidden` pierde contra el `display` de cualquier clase: aquí manda. */
.nw-siguiendo [hidden] {
  display: none !important;
}

.nw-siguiendo__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
/* Recibe el foco cuando cambia el estado de la página; no es un control. */
.nw-siguiendo__title:focus {
  outline: none;
}

/* Bajo el título, pegados a él: el resumen y, mientras carga, el aviso. */
.nw-siguiendo__summary,
.nw-siguiendo__loading {
  margin-top: -10px;
  color: var(--v5-text-muted);
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.45;
}

/* ── Tarjeta ─────────────────────────────────────────────────────────── */
.nw-siguiendo__card {
  padding: 16px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}

/* ── Sin sesión ──────────────────────────────────────────────────────── */
.nw-siguiendo__join {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
}
.nw-siguiendo__join-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nw-siguiendo__lead {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.45;
}
/* Mientras un ingreso está en curso. */
.nw-siguiendo__join [aria-disabled='true'] {
  opacity: 0.55;
  cursor: progress;
}
.nw-siguiendo__auth-error {
  padding: 10px 12px;
  border-radius: var(--v5-r2);
  background: var(--v5-dupla-soft);
  color: var(--v5-tint-law-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* ── Avisos de estado: organización, vacío y error de carga ──────────── */
.nw-siguiendo__notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.nw-siguiendo__notice-text {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.45;
}
.nw-siguiendo__note {
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}

/* ── Con sesión ──────────────────────────────────────────────────────── */
.nw-siguiendo__feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* «AVISOS» */
.nw-siguiendo__avisos {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-primary-softer);
}
.nw-siguiendo__avisos--desktop {
  display: none;
}
.nw-siguiendo__avisos-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--v5-r2);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: 17px;
}
.nw-siguiendo__avisos-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nw-siguiendo__avisos-title {
  font-size: var(--v5-text-body);
  font-weight: 700;
  line-height: 1.3;
}
.nw-siguiendo__avisos-scan {
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}
.nw-siguiendo__avisos-open,
.nw-siguiendo__avisos-open:hover {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--nw-touch);
  padding: 0 14px;
  border-radius: var(--v5-r2);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 13px;
  font-weight: 700;
}
.nw-siguiendo__avisos-open:hover {
  background: var(--v5-primary-deep);
}
.nw-siguiendo__qr {
  flex: none;
  display: flex;
  padding: 6px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r2);
  background: var(--v5-surface);
  color: var(--v5-ink);
}

/* ── Filas: rescatados y organizaciones ──────────────────────────────── */
.nw-siguiendo__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Las dos listas se leen como una sola: entre ellas, la misma separación
   que entre filas (la columna separa sus bloques 4 px más). */
.nw-siguiendo__list:not([hidden]) + .nw-siguiendo__list {
  margin-top: -4px;
}
.nw-siguiendo__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}
.nw-siguiendo__photo {
  flex: none;
  display: block;
  width: 72px;
  height: 72px;
  border-radius: var(--v5-r3);
  overflow: hidden;
  background: var(--v5-surface-muted);
}
.nw-siguiendo__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 26%;
}
.nw-siguiendo__nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--v5-border-strong);
  font-size: 24px;
}
.nw-siguiendo__logo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 8px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  overflow: hidden;
  background: var(--v5-primary-softer);
}
.nw-siguiendo__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nw-siguiendo__initials {
  color: var(--v5-primary-deep);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
}
.nw-siguiendo__info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.nw-siguiendo__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
/* En teléfono el sello de la organización va bajo su nombre. */
.nw-siguiendo__line--org {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
/* El relleno agranda el área de toque sin mover la fila. */
.nw-siguiendo__name,
.nw-siguiendo__name:hover {
  display: inline-block;
  margin: -11px 0;
  padding: 11px 0;
  color: var(--v5-ink);
  font-size: var(--v5-text-body-large);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.nw-siguiendo__name[href]:hover {
  color: var(--v5-primary-deep);
}
.nw-siguiendo__pill {
  padding: 3px 9px;
  border-radius: var(--v5-r-pill);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  line-height: 1.3;
}
.nw-siguiendo__pill--new {
  background: var(--v5-amber-soft);
  color: var(--v5-tint-myth-ink);
  font-weight: 700;
  letter-spacing: 0.6px;
}
.nw-siguiendo__pill[data-nw-tone='adoptado'] {
  background: var(--v5-success-soft);
  color: var(--v5-tint-game-ink);
}
.nw-siguiendo__meta {
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}
.nw-siguiendo__verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--v5-tint-game-ink);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  line-height: 1.3;
}
.nw-siguiendo__verified .nw-i {
  font-size: var(--v5-text-overline);
}

/* Corazón: 44 px de toque, círculo de 36. Lleno mientras se sigue. */
.nw-siguiendo__follow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--nw-touch);
  height: var(--nw-touch);
  padding: 0;
  border: 0;
  border-radius: var(--nw-r-round);
  background: transparent;
}
.nw-siguiendo__heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--nw-r-round);
  background: var(--v5-surface-muted);
  color: var(--v5-text-muted);
  font-size: 16px;
}
.nw-siguiendo__follow[aria-pressed='true'] .nw-siguiendo__heart {
  background: var(--v5-dupla-soft);
  color: var(--v5-dupla-deep);
}
.nw-siguiendo__heart-on,
.nw-siguiendo__follow[aria-pressed='true'] .nw-siguiendo__heart-off {
  display: none;
}
.nw-siguiendo__follow[aria-pressed='true'] .nw-siguiendo__heart-on {
  display: inline-block;
}

/* «Difundir» es del tablero de escritorio. */
.nw-siguiendo__share {
  display: none;
}
.nw-siguiendo__profile,
.nw-siguiendo__profile:hover {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: var(--nw-touch);
  padding: 0 14px;
  border: 1.5px solid var(--v5-border-strong);
  border-radius: var(--v5-r-pill);
  color: var(--v5-ink);
  font-size: 12.5px;
  font-weight: 700;
}
.nw-siguiendo__profile:hover {
  background: var(--v5-surface-muted);
}

/* ── Columna de la cuenta: «En la app hay más» ───────────────────────── */
.nw-siguiendo__aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.nw-siguiendo__more {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-siguiendo__more-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-siguiendo__more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}
.nw-siguiendo__more-item strong {
  color: var(--v5-ink);
  font-weight: 700;
}
.nw-siguiendo__more-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--v5-r2);
  font-size: 15px;
}
.nw-siguiendo__more-icon--hoy {
  background: var(--v5-amber-soft);
  color: var(--v5-tint-myth-ink);
}
.nw-siguiendo__more-icon--racha {
  background: var(--v5-dupla-soft);
  color: var(--v5-dupla-ink);
}
.nw-siguiendo__more-icon--juego {
  background: var(--v5-success-soft);
  color: var(--v5-tint-game-ink);
}
.nw-siguiendo__cta,
.nw-siguiendo__cta:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  border-radius: var(--v5-r3);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  box-shadow: var(--nw-glow-cta);
}
.nw-siguiendo__cta:hover {
  background: var(--v5-primary-deep);
}
.nw-siguiendo__cta .nw-i {
  font-size: 18px;
}

/* ── Escritorio: la lista a la izquierda y la cuenta a la derecha ────── */
@media (min-width: 768px) {
  .nw-siguiendo {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 24px 56px;
  }
  .nw-siguiendo__main {
    flex: 999 1 600px;
    gap: 14px;
  }
  .nw-siguiendo__aside {
    flex: 1 1 320px;
    max-width: 380px;
  }
  /* Sin tablero de escritorio para estos estados: el ancho del teléfono. */
  .nw-siguiendo__join,
  .nw-siguiendo__notice {
    width: 100%;
    max-width: var(--nw-phone-max);
  }
  .nw-siguiendo__summary,
  .nw-siguiendo__loading {
    margin-top: -8px;
    padding-bottom: 4px;
  }
  .nw-siguiendo__feed {
    gap: 14px;
  }

  /* «AVISOS» pasa a la columna de la cuenta, con el código. */
  .nw-siguiendo__avisos--phone {
    display: none;
  }
  .nw-siguiendo__avisos--desktop {
    display: flex;
    gap: 14px;
    padding: 16px;
  }
  .nw-siguiendo__avisos-text {
    gap: 4px;
  }

  .nw-siguiendo__list {
    gap: 14px;
  }
  .nw-siguiendo__list:not([hidden]) + .nw-siguiendo__list {
    margin-top: 0;
  }
  .nw-siguiendo__row {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 16px;
  }
  .nw-siguiendo__photo,
  .nw-siguiendo__logo {
    width: 80px;
    height: 80px;
  }
  .nw-siguiendo__info {
    flex: 1 1 260px;
  }
  .nw-siguiendo__line,
  .nw-siguiendo__line--org {
    flex-direction: row;
    align-items: center;
    gap: 6px 8px;
  }
  .nw-siguiendo__meta {
    font-size: 13px;
  }
  .nw-siguiendo__share,
  .nw-siguiendo__share:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: var(--nw-r-md);
    background: var(--v5-ink);
    color: var(--v5-surface);
    font-size: 12.5px;
    font-weight: 700;
  }
  .nw-siguiendo__share .nw-i {
    font-size: 13px;
  }
  .nw-siguiendo__profile {
    padding: 0 18px;
  }
}
