/* ═══════════════════════════════════════════════════════════
   gen-reddit.css — simulación de Reddit (modo oscuro)
   Solo el aspecto de Reddit; el editor usa generadores.css.
   ═══════════════════════════════════════════════════════════ */
.reddit-wrap {
  --rd-fuente: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --rd-texto: #d7dadc; --rd-tenue: #818384; --rd-borde: #343536; --rd-tarjeta: #1a1a1b;
  width: 100%; max-width: 780px; font-family: var(--rd-fuente);
  /* La simulación no hereda nada del sitio (interlineado 1.7, peso 300, tamaño variable):
     mismos valores por defecto que tenía el archivo original. */
  line-height: normal; font-weight: 400; font-size: 16px; letter-spacing: normal;
}
.reddit-wrap *, .reddit-wrap *::before, .reddit-wrap *::after { box-sizing: border-box; }

/* Post */
.r-post { background: var(--rd-tarjeta); border: 1px solid var(--rd-borde); border-radius: 10px; overflow: hidden; margin-bottom: 10px; position: relative; }
.r-layout { padding: 12px 16px; }
.r-header-layout { display: flex; align-items: center; margin-bottom: 10px; }
.r-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; margin-right: 8px; background: #fff; flex-shrink: 0; }
.r-header-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.r-top-line { display: flex; align-items: center; font-size: 12px; color: var(--rd-tenue); }
.r-bot-line { font-size: 12px; color: var(--rd-tenue); margin-top: 1px; }
.r-sub { font-weight: 700; color: var(--rd-texto); }
.r-sub::before { content: 'r/'; }
.r-dot { margin: 0 4px; }
.r-header-dots { color: var(--rd-tenue); display: flex; }
.r-title { font-size: 18px; font-weight: 500; color: var(--rd-texto); line-height: 1.35; margin-bottom: 10px; overflow-wrap: anywhere; }
.r-body { font-size: 14px; color: var(--rd-texto); line-height: 1.65; margin-bottom: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.r-awards { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.r-award { display: flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: #d4b483; background: rgba(212,180,131,.1); border: 1px solid rgba(212,180,131,.2); border-radius: 9999px; padding: 1px 7px; }
.r-pill-group { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.r-pill { display: inline-flex; align-items: center; justify-content: center; background: #2b3136; color: var(--rd-texto); border-radius: 9999px; height: 34px; font-size: 13px; font-weight: 600; padding: 0 12px; gap: 6px; }
.r-pill.vote { padding: 0 4px; }
.r-pill-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* Comentarios */
.r-comments-section { background: var(--rd-tarjeta); border: 1px solid var(--rd-borde); border-radius: 10px; padding: 16px; }
.r-comments-hd { margin-bottom: 14px; }
.r-comments-n { font-size: 14px; font-weight: 700; color: var(--rd-texto); }
.r-comment { display: flex; margin-bottom: 12px; position: relative; }
.r-c-indent { display: flex; flex-shrink: 0; }
.r-c-line { width: 2px; background: var(--rd-borde); margin: 0 10px; border-radius: 1px; flex-shrink: 0; }
.r-c-body { flex: 1; min-width: 0; }
.r-c-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-right: 10px; background: #fff; flex-shrink: 0; margin-top: 2px; }
.r-c-meta { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.r-c-author { font-size: 12px; font-weight: 700; color: var(--rd-texto); }
.r-c-time, .r-c-dot { font-size: 12px; color: var(--rd-tenue); }
.r-c-dot { margin: 0 4px; font-weight: 600; }
.r-c-text { font-size: 14px; color: var(--rd-texto); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 6px; }
.r-c-actions-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.r-c-vote-block { display: inline-flex; align-items: center; gap: 2px; color: var(--rd-tenue); font-size: 13px; font-weight: 600; }
.r-c-vote-block .r-pill-btn { width: 26px; height: 26px; }
.r-c-action-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9999px; color: var(--rd-tenue); font-size: 13px; font-weight: 600; }
@media (max-width: 480px) {
  .r-c-action-wrap .r-etq { display: none; }               /* en pantallas estrechas: solo iconos, como la app */
  .r-layout { padding: 12px; }
  .r-comments-section { padding: 12px; }
}

/* Botón de exportar de cada bloque (no sale en la imagen: .no-capture) */
.snap-zone { position: relative; margin-bottom: 10px; }
.comment-snap { border-radius: 6px; padding-top: 10px; }
.snap-ui-wrapper { position: absolute; top: 8px; right: 8px; z-index: 5; transition: opacity .18s; }
@media (hover: hover) {
  .snap-ui-wrapper { opacity: 0; }
  .snap-zone:hover .snap-ui-wrapper, .snap-ui-wrapper:focus-within { opacity: 1; }
}
/* Pantallas táctiles: sin "pasar el ratón", el botón va encima del bloque (sin taparlo) */
@media (hover: none) {
  .snap-ui-wrapper { position: static; display: flex; justify-content: flex-end; margin-bottom: 6px; }
  .comment-snap { padding-top: 0; }
}

/* Estados temporales durante la exportación por capas */
.cap-hide { opacity: 0 !important; }
.cap-hide-display { display: none !important; }
.cap-transparent { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; }

/* ── Selector de premios (editor) ─────────────────────────── */
.rd-premios { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 0.5rem; }
.rd-premio {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border-mid); border-radius: var(--radius); font-size: 0.74rem; color: var(--text-dim);
}
.rd-premio.activo { border-color: var(--accent); color: var(--text); }
.rd-premio input { width: 16px; height: 16px; accent-color: var(--accent); }
.rd-premio label { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; white-space: nowrap; min-width: 0; min-height: 30px; }
.rd-cantidad { display: flex; align-items: center; gap: 0.25rem; }
.rd-cantidad button { width: 24px; height: 24px; background: var(--bg); border: 1px solid var(--border-mid); color: var(--text); cursor: pointer; font-family: var(--font-mono); }
.rd-premio:not(.activo) .rd-cantidad { display: none; }
