/* ==========================================================================
   Comentarios del aula como los de YouTube (26-oct-2026) · assets/js/comentarios.js
   Debajo de cada clase y en «Comunidad del curso». Dre UI: tokens de liz.css (claro y oscuro salen solos), azul solo en el detalle.
   ========================================================================== */
.yt { margin-top: 16px; padding: 18px 16px 8px; border-radius: var(--radio-widget); background: var(--widget);
  box-shadow: 0 0 0 1px var(--linea), 0 1px 2px color-mix(in srgb, var(--sombra) 40%, transparent), 0 24px 48px -30px var(--sombra); scroll-margin-top: 90px; }
@media (min-width: 768px) { .yt { margin-top: 20px; padding: 22px 24px 12px; } }
.yt-sobre { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--texto-3); }
.yt-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.yt-h { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.yt-orden button { min-height: 34px; padding: 0 13px; font-size: 13px; }
@media (max-width: 420px) { .yt-orden { width: 100%; } }

/* Caras */
.yt-av { position: relative; width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; overflow: hidden; display: grid; place-items: center;
  background: var(--c, #1473FF); color: #fff; font-size: 14px; font-weight: 700; }
.yt-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-av.sm { width: 28px; height: 28px; font-size: 11px; }
.yt-av.xs { width: 28px; height: 28px; font-size: 11px; }
.yt-av.xxs { width: 18px; height: 18px; font-size: 8px; }

/* La caja «Añade un comentario…» */
.yt-caja { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 12px; }
.yt-caja-resp { margin: 10px 0 4px; gap: 10px; }
.yt-caja-cuerpo { min-width: 0; }
.yt-entrada { display: block; width: 100%; min-height: 32px; max-height: 320px; padding: 6px 0 7px; border: 0; border-bottom: 1px solid var(--linea); border-radius: 0;
  background: transparent; color: var(--texto); font: inherit; font-size: 15px; line-height: 1.45; resize: none; overflow-y: auto; transition: border-color .2s var(--curva); }
.yt-entrada::placeholder { color: var(--texto-3); }
.yt-entrada:focus { outline: none; border-bottom: 2px solid var(--acento); padding-bottom: 6px; }
.yt-caja-pie { display: none; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.yt-caja.activa .yt-caja-pie { display: flex; }
.yt-caja-pie .btn[disabled] { opacity: .45; cursor: default; }
.yt-error { margin: 8px 0 0; font-size: 13px; }

/* Un comentario */
.yt-lista { display: grid; }
.yt-com { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.yt-com + .yt-com { border-top: 1px solid color-mix(in srgb, var(--linea) 70%, transparent); }
.yt-hijo { gap: 10px; padding: 8px 0; }
.yt-hijo + .yt-hijo { border-top: 0; }
.yt-cuerpo { min-width: 0; }
.yt-fijado { display: flex; align-items: center; gap: 5px; margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--texto-3); }
.yt-fijado svg { width: 13px; height: 13px; }
.yt-quien { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 3px; font-size: 13.5px; line-height: 1.3; }
.yt-quien b { font-weight: 650; color: var(--texto); }
.yt-hace { font-size: 12.5px; color: var(--texto-3); }
.yt-pend { font-size: 11px; }
.yt-texto { font-size: 14.5px; line-height: 1.5; color: var(--texto); white-space: pre-line; overflow-wrap: anywhere; }
.yt-texto.recortado { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.yt-texto a { color: var(--acento); text-decoration: none; }
@media (hover: hover) { .yt-texto a:hover { text-decoration: underline; } }
.yt-arroba { font-weight: 600; color: var(--acento); }
.pendiente .yt-texto { color: var(--texto-2); }
.pendiente > .yt-av { opacity: .7; }

/* Lo de Omar, con un fondo sutil (y su ✓ Dreomar) */
.de-omar > .yt-cuerpo { margin: -4px 0; padding: 8px 12px 6px; border-radius: 14px; background: color-mix(in srgb, var(--acento) 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 14%, transparent); }

/* Acciones: 👍 · ❤️ por Omar · Responder */
.yt-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 4px 0 0 -8px; }
.yt-like, .yt-btn-txt, .yt-mas { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--texto-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s var(--curva), color .15s var(--curva); }
.yt-like svg, .yt-mas svg { width: 17px; height: 17px; }
.yt-like .num { min-width: 0; font-variant-numeric: tabular-nums; }
.yt-like[aria-pressed="true"] { color: var(--acento); }
.yt-like[aria-pressed="true"] svg { fill: color-mix(in srgb, var(--acento) 22%, transparent); }
.yt-like:active svg { transform: scale(.86); }
.yt-like[disabled] { opacity: .4; cursor: default; }
@media (hover: hover) { .yt-like:not([disabled]):hover, .yt-btn-txt:hover, .yt-mas:hover { background: var(--widget-2); color: var(--texto); } }
.yt-leer { margin: 2px 0 0 -10px; min-height: 30px; color: var(--texto-3); }
.yt-mas { padding: 0 8px; }
.yt-aprobar { margin-left: 6px; }
.yt-corazon { position: relative; display: inline-flex; align-items: center; margin: 0 6px 0 2px; }
.yt-corazon i { position: absolute; right: -6px; bottom: -4px; font-size: 10px; font-style: normal; line-height: 1; }

/* El hilo plegado: «▾ 3 respuestas» */
.yt-hilo { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin: 2px 0 0 -10px; padding: 0 12px 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--acento); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.yt-hilo svg { width: 17px; height: 17px; transition: transform .2s var(--curva); }
.yt-hilo[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) { .yt-hilo:hover { background: var(--acento-suave); } }
.yt-hilo-lista { margin-top: 2px; }

.yt-vacio { margin: 6px 0 14px; font-size: 14px; color: var(--texto-3); }
.yt-vacio.fila-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Al llegar desde un aviso: el comentario se ilumina un momento */
@keyframes yt-luz { 0%, 30% { background-color: color-mix(in srgb, var(--luz) 22%, transparent); } 100% { background-color: transparent; } }
.yt-resaltado { animation: yt-luz 2.6s var(--curva); border-radius: 14px; }

/* Mientras carga */
.yt-esq { display: grid; gap: 14px; padding: 8px 0 14px; }
.yt-esq-fila { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.yt-esq-fila i { display: block; height: 11px; margin: 6px 0; border-radius: 6px; background: var(--widget-2); }
.yt-esq-fila .yt-esq-av { width: 40px; height: 40px; margin: 0; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) { .yt-esq-fila i { animation: yt-pulso 1.4s ease-in-out infinite; } }
@keyframes yt-pulso { 50% { opacity: .5; } }

/* Comunidad del curso (portada del curso) */
.au-comunidad-curso { margin-top: 8px; }
@media (min-width: 1024px) { .au-comunidad-curso .yt { max-width: calc(100% - 380px); } }

/* La campanita del aula */
.yt-campana { position: relative; }
.yt-avisos { padding-bottom: 8px; }
.yt-aviso { align-items: center; }
.yt-aviso .cuerpo .t { white-space: normal; }
.yt-aviso.nueva { background: color-mix(in srgb, var(--acento) 6%, transparent); }
.yt-punto { width: 9px; height: 9px; flex-shrink: 0; border-radius: 999px; background: var(--acento); }
.yt-avisos .yt-vacio { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.yt-avisos .yt-vacio svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) { .yt-resaltado { animation: none; } .yt-hilo svg, .yt-entrada { transition: none; } }

/* Panel → Comentarios: a quién le contesta, likes y lo de Omar */
.pn-com-contesta { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--linea); font-size: 13px; line-height: 1.45; color: var(--texto-3); overflow-wrap: anywhere; }
.pn-com-meta { margin-top: 6px; }
.pn-com-omar .pn-com-texto { color: var(--texto-2); }
.pn-com-ambito { margin-bottom: 12px; }
.pn-com-ambito button { min-height: 34px; padding: 0 13px; font-size: 13px; }
