/* Redacción inteligente de publicaciones (pestaña «Publicación» de una vacante, Sofía 4.3): selector de canal, panel de redacción, propuesta con comparación,
   estilo de Aromacom y estado de cada canal. Misma identidad: botones negros, chips con su marca, temas claro y oscuro (solo tokens, nada de colores fijos). */

/* ---------- Selector de canal ---------- */
.red-canales { display: flex; flex-wrap: wrap; gap: var(--e2); }
.red-tab { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.05rem; min-height: 2.75rem; padding: 0.35rem 1rem; background: var(--sup); color: var(--tx); border: 1px solid var(--bd); border-radius: 0.9rem; font: inherit; font-size: var(--paso--1); font-weight: 700; text-align: left; cursor: pointer; }
.red-tab small { font-size: var(--paso--2); font-weight: 600; color: var(--tx-3); line-height: 1.3; }
.red-tab:hover { border-color: var(--tx); }
.red-tab[aria-selected="true"] { background: var(--tx); color: var(--fondo); border-color: var(--tx); }
.red-tab[aria-selected="true"] small { color: inherit; opacity: 0.85; }
.red-tab small[data-nota="propuesta"]::before, .red-tab small[data-nota="sucio"]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 0.3rem; border-radius: 50%; background: var(--amarillo); vertical-align: 0.05em; }
.red-linea { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e1) var(--e2); margin: 0; }
.red-linea .chip { font-size: var(--paso--2); }

/* ---------- Panel de redacción ---------- */
.red-panel { display: flex; flex-direction: column; gap: var(--e3); }
.red-panel > p { margin: 0; }
.red-form { gap: var(--e3); }
.red-form textarea { min-height: 4.5rem; }
.red-extension { margin: 0; padding: 0; border: 0; min-width: 0; }
.red-fila { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e4); }
.red-opcion { align-items: center; gap: var(--e2); }
.red-rapidas { display: flex; flex-wrap: wrap; gap: var(--e2); }
.red-rapida { white-space: normal; text-align: left; }
.red-rapida:disabled { opacity: 0.55; cursor: not-allowed; }
.red-ia-marca { display: inline-block; padding: 0 0.3rem; border: 1px solid currentColor; border-radius: 0.4rem; font-size: 0.65rem; font-weight: 800; line-height: 1.35; letter-spacing: 0.04em; }
.red-mas > summary { cursor: pointer; font-size: var(--paso--1); font-weight: 700; color: var(--tx-2); padding: 0.2rem 0; }
.red-mas[open] > summary { margin-bottom: var(--e2); }

/* ---------- Instrucciones globales, lo que Sofía entendió e historial ---------- */
.red-global textarea { min-height: 4.5rem; }
.red-entendido { padding: var(--e3) var(--e4); border: 1px solid var(--bd); border-left-width: 4px; border-radius: 0.8rem; display: flex; flex-direction: column; gap: var(--e1); min-width: 0; }
.red-entendido p, .red-entendido ul { margin: 0; }
.red-entendido ul { padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--paso--1); overflow-wrap: anywhere; }
.red-historial { border: 1px solid var(--ln); border-radius: 0.9rem; padding: var(--e3) var(--e4); min-width: 0; }
.red-historial > summary { cursor: pointer; font-size: var(--paso--1); font-weight: 800; }
.red-historial > summary small { font-weight: 600; color: var(--tx-3); margin-left: 0.3rem; }
.red-historial[open] > summary { margin-bottom: var(--e3); }
.red-historial-lista { list-style: none; margin: 0 0 var(--e2); padding: 0; display: flex; flex-direction: column; gap: var(--e2); }
.red-historial-lista li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--e2) var(--e4); padding: var(--e2) var(--e3); border: 1px solid var(--ln); border-radius: 0.7rem; min-width: 0; }
.red-historial-lista li[data-actual="true"] { border-color: var(--bd); }
.red-historial-datos { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1 1 18rem; font-size: var(--paso--1); overflow-wrap: anywhere; }
.red-historial-datos span { line-height: 1.4; }
.red-historial p { margin: 0; }

/* ---------- La propuesta ---------- */
.red-propuesta { display: flex; flex-direction: column; gap: var(--e3); padding: var(--e4); border: 1px solid var(--bd); border-radius: 1rem; min-width: 0; }
.red-propuesta p, .red-propuesta ul { margin: 0; }
.red-prop-cabeza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e2) var(--e3); }
.red-prop-cabeza h4 { margin: 0; font-size: var(--paso-0); }
.red-notas { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--e1); }
.red-notas li { display: flex; align-items: flex-start; gap: var(--e2); font-size: var(--paso--1); line-height: 1.45; color: var(--tx-2); }
.red-notas li svg { flex: none; margin-top: 0.2em; }
.red-notas li[data-c="semana"] { padding: 0.3rem 0.7rem; border-left: 3px solid var(--amarillo); color: var(--tx); }
.red-vistas { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e4); }
.red-lado { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e3); }
@container principal (min-width: 780px) { .red-lado { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.red-col { min-width: 0; display: flex; flex-direction: column; gap: var(--e2); }
.red-col h5 { margin: 0; font-size: var(--paso--1); font-weight: 800; }
.red-col h5 small { font-weight: 600; color: var(--tx-3); margin-left: 0.3rem; }
.red-texto { margin: 0; padding: var(--e3); background: var(--sup); border: 1px solid var(--ln); border-radius: 0.8rem; font: inherit; font-size: var(--paso--1); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 26rem; overflow: auto; min-width: 0; }
.red-nuevo { border-color: var(--bd); }
/* Agregado y quitado se distinguen sin depender del color: subrayado grueso y tachado */
.red-diff ins, .red-col h5 ins { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; background: color-mix(in srgb, var(--celeste) 38%, transparent); color: inherit; border-radius: 0.2rem; }
.red-diff del, .red-col h5 del { text-decoration: line-through; text-decoration-thickness: 1.5px; background: color-mix(in srgb, var(--rojo) 22%, transparent); color: var(--tx-2); border-radius: 0.2rem; }
.red-como > summary { cursor: pointer; font-size: var(--paso--1); font-weight: 700; color: var(--tx-2); }
.red-como ul { margin-top: var(--e2); padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; color: var(--tx-2); }
.red-prop-acciones { gap: var(--e2); }
.red-pref-form { padding-top: var(--e2); border-top: 1px solid var(--ln); }

/* ---------- Estilo de Aromacom ---------- */
.red-estilo > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e2); cursor: pointer; list-style: none; }
.red-estilo > summary::-webkit-details-marker { display: none; }
.red-estilo > summary h3 { margin: 0; }
.red-estilo[open] > summary { margin-bottom: var(--e3); }
.red-prefs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e4); }
@container principal (min-width: 780px) { .red-prefs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.red-pref { display: flex; flex-direction: column; gap: var(--e2); min-width: 0; padding: var(--e3); border: 1px solid var(--ln); border-radius: 0.9rem; }
.red-pref h4 { margin: 0; font-size: var(--paso--1); }
.red-pref p { margin: 0; }
.red-pref-texto { padding: var(--e2) var(--e3); background: var(--sup); border-radius: 0.7rem; overflow-wrap: anywhere; font-size: var(--paso--1); }
.red-pref-pendiente { display: flex; flex-direction: column; gap: var(--e2); padding-top: var(--e2); border-top: 1px dashed var(--bd); }

/* ---------- Estado de cada canal ---------- */
.red-estados { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e3); }
.red-estados > li { padding: var(--e3) var(--e4); border: 1px solid var(--ln); border-radius: 0.9rem; min-width: 0; }
.red-estados h3 { margin: 0 0 var(--e2); font-size: var(--paso-0); }
.red-cuatro { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e3) var(--e4); margin: 0; }
@container principal (min-width: 720px) { .red-cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container principal (min-width: 1180px) { .red-cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.red-celda { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.red-celda dt { font-size: var(--paso--2); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tx-3); }
.red-celda dd { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; min-width: 0; }
.red-celda dd small { color: var(--tx-3); font-size: var(--paso--1); line-height: 1.45; overflow-wrap: anywhere; }
.red-celda .chip { white-space: normal; }
.red-qr { min-width: 0; }

@media (max-width: 599px) {
  .red-tab { flex: 1 1 calc(50% - var(--e2)); min-width: 0; }
  .red-propuesta { padding: var(--e3); }
  .red-prop-acciones .boton { flex: 1 1 100%; }
  .red-texto { max-height: 20rem; }
}

/* Sofía 4.4: el estilo aprobado de Aromacom a la vista y lo reservado para Recursos Humanos */
.red-estilo-aplicado, .red-reservado { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); margin: 0; min-width: 0; }
.red-estilo-aplicado .apagado { min-width: 0; overflow-wrap: anywhere; }
