/* El Solitario · Comentarios (mu-plugin elsolitario-comments.php) */

/* Bug de Hestia: .media .media-body { word-break: break-all } parte palabras. */
#comments .media-body,
#respond .media-body {
  word-break: normal !important;
  overflow-wrap: anywhere;
  hyphens: manual;
}

/* Lista */
#comments .media-area { max-width: 780px; margin: 0 auto; }
#comments .hestia-title { margin-bottom: 18px; }
#comments .comment.media {
  margin: 0;
  padding: 18px 0 12px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
#comments .media-area > .comment.media:first-of-type,
#comments ul.children .comment.media { border-top: 0; }
#comments ul.children {
  list-style: none;
  margin: 4px 0 0 20px;
  padding: 0 0 0 18px;
  border-left: 2px solid rgba(0, 0, 0, .09);
}
#comments ul.children .comment.media { padding-top: 12px; }
#comments .comment .pull-left { margin-right: 14px; }
#comments .comment-author.avatar { width: 44px; height: 44px; }
#comments .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; display: block;
}
#comments h4.media-heading {
  font-size: 16px; line-height: 1.3; margin: 2px 0 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
}
#comments h4.media-heading small {
  font-size: 13px; color: #6b7280; white-space: nowrap; letter-spacing: .01em;
}
#comments .media-body > p { margin: 0 0 8px; line-height: 1.6; font-size: 16px; }
#comments .media-footer { margin-top: 0; }
#comments .comment-reply-link {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .7;
}
#comments .comment-reply-link:hover { opacity: 1; }

/* Respuestas del equipo */
#comments .bypostauthor > .media-body {
  background: #eef4fb;
  border-left: 3px solid #2f6fdb;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px 8px;
}
#comments .bypostauthor > .media-body h4.media-heading::after {
  content: var(--es-author-label, "Autor");
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #1d4ed8; background: #dbe7fb; border-radius: 999px; padding: 2px 8px;
}

/* Código dentro de comentarios */
#comments .media-body pre {
  margin: 8px 0 10px; padding: 12px 14px; border-radius: 8px;
  font-size: 14px; line-height: 1.5; overflow-x: auto; white-space: pre;
  word-break: normal !important; overflow-wrap: normal;
}
#comments .media-body :not(pre) > code {
  font-size: .88em; padding: .1em .35em; border-radius: 4px;
  background: rgba(0, 0, 0, .06);
}

/* Formulario */
#respond .comment-notes { color: #6b7280; font-size: 14px; }
#respond .es-code-note { color: #4b5563; font-size: 13px; margin: 4px 0 0; }
#respond .es-code-note code { font-size: .95em; }
#respond textarea.form-control { min-height: 120px; }
#respond .akismet-fields-container,
#respond .akismet-fields-container label { display: none !important; }
#respond .cf-turnstile { margin: 12px 0 4px; }
/* En Hestia el .row envuelve TODO el formulario (columnas, textarea y botón). */
#respond form > .row { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; }
#respond form > .row > [class*="col-"] { flex: 1 1 260px; width: auto; float: none; padding: 0; }
#respond form > .row > :not([class*="col-"]) { flex: 0 0 100%; width: 100%; }
#respond .es-code-note code { background: rgba(0, 0, 0, .06); color: inherit; padding: .05em .3em; border-radius: 3px; }
/* El botón flotante del índice se esconde mientras se leen los comentarios */
body.es-in-comments .ytechbot-toc-fab { opacity: 0 !important; pointer-events: none !important; transition: opacity .25s; }
@media (max-width: 767px) {
  #comments .media-area { padding: 0 6px; }
  #comments ul.children { margin-left: 4px; padding-left: 12px; }
  #comments .comment .pull-left { margin-right: 10px; }
  #comments .avatar, #comments .comment-author.avatar { width: 36px; height: 36px; }
  #respond .form-submit { text-align: center; }
  #respond .btn.pull-right { float: none; }
}

/* Llamado al final del artículo */
.es-comment-cta {
  margin: 34px 0 8px; padding: 18px 20px;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px;
  background: linear-gradient(135deg, #f7f9fc, #eef4fb);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
}
.es-comment-cta p { margin: 0; flex: 1 1 320px; line-height: 1.5; }
.es-comment-cta .es-cta-btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: #2f6fdb; color: #fff !important; font-weight: 600; text-decoration: none;
}
.es-comment-cta .es-cta-link { font-size: 15px; margin-left: 8px; }

/* Modo oscuro (el mu-plugin principal alterna html.ytechbot-dark) */
html.ytechbot-dark #comments .comment.media { border-top-color: rgba(255, 255, 255, .1); }
html.ytechbot-dark #comments ul.children { border-left-color: rgba(255, 255, 255, .12); }
html.ytechbot-dark #comments .bypostauthor > .media-body { background: rgba(47, 111, 219, .16); }
html.ytechbot-dark #comments .bypostauthor > .media-body h4.media-heading::after { background: rgba(47, 111, 219, .35); color: #cfe0ff; }
html.ytechbot-dark #comments h4.media-heading small { color: #9aa3b2; }
html.ytechbot-dark .es-comment-cta { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
html.ytechbot-dark #comments .media-body :not(pre) > code,
html.ytechbot-dark #respond .es-code-note code { background: rgba(255, 255, 255, .1); }
