/* runner.css - editor y ejecucion de Python en la pagina de un ejercicio. Usa las variables --c-* de course.css. */
.runner { margin: 1.5rem 0; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-panel); overflow: hidden; }
.runner-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--c-border); }
.runner-head h2 { margin: 0; font-size: 1rem; color: var(--c-text); }
.runner-status { color: var(--c-muted); font-size: .85rem; min-height: 1.2em; }
.runner-editor textarea#runner-code { width: 100%; min-height: 12rem; box-sizing: border-box; padding: .8rem; border: 0; resize: vertical; background: var(--c-panel); color: var(--c-text); font: 14px/1.5 'Fira Code', ui-monospace, monospace; tab-size: 4; }
.runner .CodeMirror { height: auto; min-height: 12rem; font: 14px/1.5 'Fira Code', ui-monospace, monospace; background: var(--c-panel); color: var(--c-text); }
.runner .CodeMirror-gutters { background: var(--c-panel); border-right: 1px solid var(--c-border); }
.runner-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem .9rem; border-top: 1px solid var(--c-border); }
.runner-btn { padding: .45rem 1rem; border: 1px solid var(--c-primary); border-radius: 8px; background: var(--c-primary); color: #fff; font-weight: 600; cursor: pointer; }
.runner-btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.runner-btn:disabled { opacity: .6; cursor: not-allowed; }
.runner-btn-secondary { background: transparent; color: var(--c-primary); }
.runner-btn-secondary:hover { color: #fff; }
.runner-io { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--c-border); }
.runner-io > div + div { border-left: 1px solid var(--c-border); }
.runner-io label { display: block; padding: .45rem .9rem 0; font-size: .8rem; font-weight: 600; color: var(--c-muted); }
.runner-io textarea, .runner-output { width: 100%; box-sizing: border-box; min-height: 7rem; margin: 0; padding: .5rem .9rem .8rem; border: 0; background: transparent; color: var(--c-text); font: 13px/1.5 'Fira Code', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; }
.runner-output.is-error { color: #dc2626; }
@media (max-width: 700px) { .runner-io { grid-template-columns: 1fr; } .runner-io > div + div { border-left: 0; border-top: 1px solid var(--c-border); } }

/* ---- Pruebas ---- */
.runner-btn-test { background: #16a34a; border-color: #16a34a; }
.runner-btn-test:hover { background: #15803d; border-color: #15803d; }
.runner-tests { border-top: 1px solid var(--c-border); padding: .7rem .9rem; }
.rt-summary { font-weight: 700; margin-bottom: .5rem; }
.rt-summary.is-ok { color: #16a34a; }
.rt-summary.is-bad { color: #dc2626; }
.rt-case { border: 1px solid var(--c-border); border-radius: 8px; margin: .3rem 0; background: var(--c-panel); }
.rt-case > summary { padding: .4rem .7rem; cursor: pointer; font-size: .9rem; }
.rt-case.is-ok > summary { color: #16a34a; }
.rt-case.is-bad > summary { color: #dc2626; }
.rt-body { padding: 0 .7rem .6rem; }
.rt-label { font-size: .75rem; font-weight: 600; color: var(--c-muted); margin-top: .4rem; }
.rt-pre { margin: .15rem 0 0; padding: .4rem .6rem; border-radius: 6px; background: color-mix(in srgb, var(--c-text) 6%, var(--c-panel)); color: var(--c-text); font: 13px/1.5 'Fira Code', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Enviar ---- */
.runner-btn-submit { background: #2563eb; border-color: #2563eb; }
.runner-btn-submit:hover { background: #1d4ed8; border-color: #1d4ed8; }
.runner-submit-msg { border-top: 1px solid var(--c-border); padding: .6rem .9rem; font-weight: 600; }
.runner-submit-msg.is-ok { color: #16a34a; }
.runner-submit-msg.is-bad { color: #dc2626; }
.runner-submit-msg.is-info { color: var(--c-text); font-weight: 400; }
.runner-history { border-top: 1px solid var(--c-border); padding: .6rem .9rem; }
.runner-history h3 { margin: 0 0 .3rem; font-size: .9rem; }
.runner-history ul { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.runner-history li { display: flex; gap: .75rem; padding: .15rem 0; }
.runner-history .rh-date { color: var(--c-muted); min-width: 10.5rem; }
.runner-history .rh-ok { color: #16a34a; }
.runner-history .rh-bad { color: #dc2626; }
