/* Reemplazos y traspaso de un curso — js/substitutes.js
   (+ marcas en la lista de grupos y en notas de solo lectura) */

/* ── Lista de grupos: grupos en los que reemplazo ── */
.group-sub-head {
  margin: 12px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #fcd34d;
}
.group-item-sub .group-item-icon { opacity: .95; }
.group-sub-badge {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
  color: #fcd34d; background: rgba(252, 211, 77, .12); border: 1px solid rgba(252, 211, 77, .35);
}

/* ── Nota de otro profe abierta por el reemplazante: solo lectura ── */
.note-lock-banner {
  margin: 0 0 10px; padding: 9px 14px; border-radius: 10px;
  font-size: 14px; line-height: 1.45; color: #fde68a;
  background: rgba(252, 211, 77, .10); border: 1px solid rgba(252, 211, 77, .35);
}
.note-lock-banner[hidden] { display: none; }
body.note-locked #toolbar { opacity: .45; pointer-events: none; }
.note-lock-ico { font-size: .85em; }

/* ── Modales ── */
.subs-overlay {
  position: fixed; inset: 0; z-index: 10050; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(1, 4, 9, .66);
}
.subs-overlay.open { display: flex; }
.subs-card {
  width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto;
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  padding: 20px 22px; color: #e6edf3;
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.subs-card.narrow { max-width: 520px; }
.subs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.subs-head h2 { margin: 0; font-size: 20px; color: #f0f6fc; }
.subs-x { background: none; border: none; color: #8b949e; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.subs-x:hover { color: #f0f6fc; background: #21262d; }
.subs-intro { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: #c9d1d9; }
.subs-sec { border-top: 1px solid #30363d; padding: 14px 0 6px; }
.subs-sec h3 { margin: 0 0 10px; font-size: 15px; color: #f0f6fc; }
.subs-empty { font-size: 14px; color: #8b949e; padding: 4px 0 8px; }
.subs-empty.err { color: #fca5a5; }

.subs-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin-bottom: 12px; }
.subs-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #e6edf3; cursor: pointer; }
.subs-check small { color: #8b949e; }
.subs-check input { accent-color: #58a6ff; width: 16px; height: 16px; }

.subs-row { display: flex; flex-wrap: wrap; gap: 12px; }
.subs-row.col { flex-direction: column; }
.subs-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #8b949e; flex: 1 1 180px; }
.subs-field select, .subs-field input {
  font: inherit; font-size: 14px; color: #e6edf3; background: #0d1117;
  border: 1px solid #30363d; border-radius: 8px; padding: 8px 10px; color-scheme: dark;
}
.subs-field select:focus, .subs-field input:focus { outline: none; border-color: #58a6ff; }

.subs-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.subs-msg { font-size: 13.5px; color: #8b949e; }
.subs-msg.err { color: #fca5a5; }
.subs-msg.ok { color: #86efac; }
.subs-btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 9px; border: 1px solid #3d444d; background: #21262d; color: #e6edf3;
}
.subs-btn:hover { border-color: #58a6ff; }
.subs-btn:disabled { opacity: .5; cursor: default; }
.subs-btn.primary { background: #2f81f7; border-color: #2f81f7; color: #ffffff; }
.subs-btn.danger { background: transparent; border-color: rgba(248, 81, 73, .5); color: #fca5a5; }
.subs-btn.danger:hover { background: rgba(248, 81, 73, .12); }
.subs-btn.sm { padding: 4px 10px; font-size: 12.5px; }

.subs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.subs-table th { text-align: left; font-size: 12px; font-weight: 600; color: #8b949e; padding: 6px 8px; border-bottom: 1px solid #30363d; }
.subs-table td { padding: 8px; border-bottom: 1px solid #21262d; color: #e6edf3; vertical-align: middle; }
.subs-table td small { display: block; color: #8b949e; font-size: 12px; }
.subs-table .nowrap { white-space: nowrap; }
.subs-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.subs-status.active { color: #86efac; background: rgba(134, 239, 172, .12); }
.subs-status.upcoming { color: #7dd3fc; background: rgba(125, 211, 252, .12); }
.subs-status.ended { color: #8b949e; background: rgba(139, 148, 158, .12); }
.subs-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #e6edf3; }

@media (max-width: 600px) {
  .subs-table th:nth-child(4), .subs-table td:nth-child(4) { display: none; }
}
