/* Readers' comments at the end of an article (lib/comentarios.js, site/comentarios.js). The
   section sits in the reading column, after the byline, and follows the article's look: a bar
   in the accent colour over the heading, condensed type for names, the body font for the text. */

.cm { margin-top: 56px; }
.cm-h { font-family: var(--cond); font-weight: 800; font-size: clamp(30px, 4vw, 38px); line-height: 1.02; }
.cm-h::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 14px; border-radius: 2px; background: var(--barro); }
.cm-n { color: var(--gris); font-weight: 600; }

/* No comments yet: an invitation, never an empty box or a "0". */
.cm-vacio { margin-top: 18px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--linea); border-left: 4px solid var(--barro); border-radius: var(--radius-md); }
.cm-invita { font-family: var(--cond); font-weight: 800; font-size: clamp(26px, 3.4vw, 32px); line-height: 1.05; color: var(--noche); }
.cm-sub { margin-top: 8px; font-size: 17px; line-height: 1.55; color: var(--gris); }

.cm-lista { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--linea); }
.cm-item { padding: 20px 0 14px; border-bottom: 1px solid var(--linea); }
.cm-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.cm-autor { font-family: var(--cond); font-weight: 800; font-size: 21px; line-height: 1.1; }
.cm-cuando { font-size: 14px; color: var(--gris); }
.cm-txt { margin-top: 8px; font-size: 17.5px; line-height: 1.6; overflow-wrap: anywhere; }
.cm-pie { margin-top: 8px; }
.cm-accion { padding: 6px 0; border: 0; background: none; color: var(--gris); font: inherit; font-size: 14px; text-decoration: underline; text-decoration-color: var(--linea); text-underline-offset: 3px; cursor: pointer; }
.cm-accion:hover { color: var(--noche); text-decoration-color: currentColor; }
.cm-accion.cm-armado { color: var(--alerta); text-decoration-color: currentColor; font-weight: 700; }
.cm-accion:disabled { cursor: default; text-decoration: none; }
/* The one just published shows where it landed. */
.cm-nuevo { animation: cm-llega 2.4s ease-out; }
@keyframes cm-llega { from { background: #f6e3d7; } to { background: transparent; } }

.cm-abrir-fila { margin-top: 22px; }

/* The form, on white like the "En corto" card. */
.cm-form { margin-top: 22px; padding: 22px 24px 20px; background: var(--surface); border: 1px solid var(--linea); border-top: 4px solid var(--barro); border-radius: var(--radius-md); }
.cm-campo + .cm-campo { margin-top: 16px; }
.cm-campo label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 16px; }
.cm-campo input, .cm-campo textarea { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--gris); border-radius: var(--radius-sm); background: var(--surface); color: var(--noche); font: inherit; font-size: 17px; line-height: 1.5; }
.cm-campo textarea { min-height: 8.5rem; resize: vertical; }
.cm-campo input:focus-visible, .cm-campo textarea:focus-visible { outline: 3px solid var(--barro); outline-offset: 1px; }
.cm-cuenta { display: block; margin-top: 4px; font-size: 13.5px; color: var(--gris); text-align: right; }
.cm-cuenta:empty { display: none; }
.cm-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cm-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.cm-acciones .btn:disabled { opacity: .6; cursor: wait; }
.cm-estado { font-size: 16px; line-height: 1.4; }
.cm-estado.cm-mal { color: var(--alerta); font-weight: 700; }
.cm-estado.cm-bien { color: var(--monte); font-weight: 700; }
.cm-reglas { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--gris); }

@media (max-width: 480px) {
  .cm-vacio, .cm-form { padding: 18px 16px; }
  .cm-acciones .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cm-nuevo { animation: none; } }
