/* ===== V10.30 respuestas compactas forzadas ===== */

.am-topic-stream {
  gap: 14px !important;
}

.am-topic-replies__list {
  gap: 9px !important;
}

.am-topic-reply-card--compact-v1030,
.am-topic-reply-card {
  border-radius: 16px !important;
  background: #fbfcfd !important;
  border-color: rgba(17, 17, 17, 0.085) !important;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.045) !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__inner,
.am-topic-reply-card__inner {
  padding: 12px 14px !important;
  border-radius: 16px !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__header,
.am-topic-reply-card__header {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__avatar,
.am-topic-reply-card__avatar {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  line-height: 0 !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__avatar img,
.am-topic-reply-card__avatar img,
.am-topic-reply-card__avatarimg {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 999px !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__authorname,
.am-topic-reply-card__authorname {
  font-size: 13px !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__authorline,
.am-topic-reply-card__authorline {
  margin-top: 1px !important;
  gap: 4px !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
  color: rgba(31, 34, 48, 0.48) !important;
  font-weight: 650 !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__content,
.am-topic-reply-card__content {
  margin-top: 8px !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody,
.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody p,
.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody li,
.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody span,
.am-topic-reply-card__contentbody,
.am-topic-reply-card__contentbody p,
.am-topic-reply-card__contentbody li,
.am-topic-reply-card__contentbody span {
  color: #555d72 !important;
  font-size: 13.5px !important;
  line-height: 1.46 !important;
  font-weight: 500 !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody p,
.am-topic-reply-card__contentbody p {
  margin: 0 0 8px !important;
}

.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody strong,
.am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody b,
.am-topic-reply-card__contentbody strong,
.am-topic-reply-card__contentbody b {
  color: #394154 !important;
  font-weight: 700 !important;
}

/* Las respuestas deben verse completas: sin Leer más */
.am-topic-reply-card .am-topic-readmore,
.am-topic-reply-card .am-topic-readmore-toggle {
  display: none !important;
}

.am-topic-reply-card__content.is-collapsible .am-topic-reply-card__contentbody {
  max-height: none !important;
  overflow: visible !important;
}

.am-topic-reply-card__content.is-collapsible .am-topic-reply-card__contentbody::after {
  display: none !important;
}

@media (max-width: 760px) {
  .am-topic-stream {
    gap: 12px !important;
  }

  .am-topic-replies__list {
    gap: 8px !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__inner,
  .am-topic-reply-card__inner {
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__header,
  .am-topic-reply-card__header {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__avatar,
  .am-topic-reply-card__avatar,
  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__avatar img,
  .am-topic-reply-card__avatar img,
  .am-topic-reply-card__avatarimg {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__authorname,
  .am-topic-reply-card__authorname {
    font-size: 12.5px !important;
    line-height: 1.05 !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__authorline,
  .am-topic-reply-card__authorline {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__content,
  .am-topic-reply-card__content {
    margin-top: 7px !important;
  }

  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody,
  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody p,
  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody li,
  .am-topic-reply-card--compact-v1030 .am-topic-reply-card__contentbody span,
  .am-topic-reply-card__contentbody,
  .am-topic-reply-card__contentbody p,
  .am-topic-reply-card__contentbody li,
  .am-topic-reply-card__contentbody span {
    color: #5a6277 !important;
    font-size: 13px !important;
    line-height: 1.44 !important;
    font-weight: 500 !important;
  }
}


/* ===== V10.31 evitar desborde de enlaces largos en respuestas ===== */

/* Corta cualquier contenido largo sin ampliar la página */
html,
body,
.fp-sitecontainer,
.am-single-topic-page,
.am-single-topic-page__main,
.am-topic-stream,
.am-topic-replies,
.am-topic-replies__list,
.am-topic-reply-card,
.am-topic-reply-card__inner,
.am-topic-reply-card__content,
.am-topic-reply-card__contentbody {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Evita scroll horizontal por enlaces, números largos, emails o textos sin espacios */
.am-topic-reply-card__contentbody,
.am-topic-reply-card__contentbody p,
.am-topic-reply-card__contentbody li,
.am-topic-reply-card__contentbody span,
.am-topic-reply-card__contentbody div,
.am-topic-reply-card__contentbody strong,
.am-topic-reply-card__contentbody b,
.am-topic-reply-card__contentbody em {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

/* Enlaces largos: WhatsApp, teléfonos, URLs, correos, etc. */
.am-topic-reply-card__contentbody a {
  display: inline !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Elementos que suelen romper el ancho */
.am-topic-reply-card__contentbody img,
.am-topic-reply-card__contentbody video,
.am-topic-reply-card__contentbody iframe,
.am-topic-reply-card__contentbody embed,
.am-topic-reply-card__contentbody object {
  max-width: 100% !important;
  height: auto !important;
}

.am-topic-reply-card__contentbody pre,
.am-topic-reply-card__contentbody code {
  max-width: 100% !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Última protección móvil contra ampliación lateral */
@media (max-width: 760px) {
  html,
  body,
  .fp-sitecontainer,
  .am-single-topic-page,
  .am-topic-stream,
  .am-topic-replies__list {
    overflow-x: hidden !important;
  }

  .am-topic-reply-card__contentbody a {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

/* ===== V10.66 enlaces de respuestas limpios para plugin =====
   Se conserva solo la protección anti-desborde. El color, fondo, borde y forma
   de los enlaces ahora se gestionan desde el plugin BE Enlaces Botón. */
.am-topic-reply-card__contentbody a,
.am-topic-reply-card__contentbody a:visited,
.am-topic-reply-card__contentbody a:hover,
.am-topic-reply-card__contentbody a:focus,
.am-topic-reply-card__contentbody a:active,
body .am-topic-reply-card .am-topic-reply-card__contentbody a,
body .am-topic-reply-card .am-topic-reply-card__contentbody a:visited,
body .am-topic-reply-card .am-topic-reply-card__contentbody a:hover,
body .am-topic-reply-card .am-topic-reply-card__contentbody a:focus,
body .am-topic-reply-card .am-topic-reply-card__contentbody a:active {
  max-width: 100%;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
}
