/* ==========================================================================
   VAE – Horario de clases en vivo (Fase 2, vista del estudiante)
   ========================================================================== */

/* ── "Continuar" – Direkteinstieg in die aktuelle Lektion ───────────────── */

.vae-continuar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin: 26px 0 0;
	padding: 18px 24px;
	border: 1px solid #cfe0ec;
	border-left: 5px solid #EC5800;
	border-radius: 12px;
	background: linear-gradient(135deg, #f7fbfd 0%, #eef5fa 100%);
	font-size: 15px;
	line-height: 1.4;
	color: #1d2b36;
}

.vae-continuar.is-finished { border-left-color: #2e7d32; }

.vae-continuar__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.vae-continuar__label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	color: #6b7a89;
}

.vae-continuar__lesson {
	font-size: 17px;
	font-weight: 700;
	color: #10222f;
	overflow-wrap: anywhere;
}

.vae-continuar__meta { font-size: 13px; color: #6b7a89; }

.vae-continuar__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: none;
	padding: 13px 28px;
	border-radius: 8px;
	background: #EC5800;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: .2px;
	white-space: nowrap;
	transition: background .15s ease;
}

.vae-continuar__btn:hover,
.vae-continuar__btn:focus { background: #c94a00; color: #fff; }

.vae-continuar.is-finished .vae-continuar__btn { background: #2e7d32; }
.vae-continuar.is-finished .vae-continuar__btn:hover { background: #24632a; }

@media (max-width: 640px) {
	.vae-continuar {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}
	.vae-continuar__lesson { font-size: 16px; }
	.vae-continuar__btn { justify-content: center; width: 100%; }
}

.vae-horario {
	--vae-blue:   #00416A;
	--vae-blue-2: #12608f;
	--vae-accent: #EC5800;
	--vae-live:   #d63638;
	--vae-line:   #dbe4ec;
	--vae-muted:  #6b7a89;

	margin: 34px 0;
	padding: 0;
	border: 1px solid var(--vae-line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.45;
	color: #1d2b36;
	box-shadow: 0 1px 3px rgba(0, 65, 106, .06);
}

.vae-horario * { box-sizing: border-box; }

/* ── Cabecera ──────────────────────────────────────────────────────────── */

.vae-horario__head {
	padding: 20px 24px 16px;
	background: linear-gradient(135deg, var(--vae-blue) 0%, var(--vae-blue-2) 100%);
	color: #fff;
}

.vae-horario__title {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .2px;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 9px;
}

.vae-horario__icon { font-size: 20px; line-height: 1; }

.vae-horario__sub {
	margin: 0;
	font-size: 13.5px;
	color: rgba(255, 255, 255, .82);
}

.vae-horario__tz { opacity: .75; }

.vae-horario__bar {
	margin-top: 12px;
	height: 5px;
	border-radius: 3px;
	background: rgba(255, 255, 255, .22);
	overflow: hidden;
}

.vae-horario__bar > span {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: #7fd1a8;
	transition: width .4s ease;
}

/* ── Aviso de asistencia (Fase 3) ──────────────────────────────────────── */

.vae-asis-aviso {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 13px 24px;
	border-bottom: 1px solid var(--vae-line);
	font-size: 14px;
	background: #f4f9f5;
	color: #1d2b36;
}

.vae-asis-aviso.nivel-aviso   { background: #fdf8ea; }
.vae-asis-aviso.nivel-alerta  { background: #fdf0e4; }
.vae-asis-aviso.nivel-critico { background: #fdeaea; }

.vae-asis-aviso__icon { font-size: 17px; line-height: 1.3; flex: none; }
.vae-asis-aviso__text { line-height: 1.45; }

.vae-asis-aviso__msg {
	display: block;
	font-size: 13px;
	color: var(--vae-muted);
	margin-top: 1px;
}

.vae-asis-aviso.nivel-alerta  .vae-asis-aviso__msg { color: #9a4b00; font-weight: 600; }
.vae-asis-aviso.nivel-critico .vae-asis-aviso__msg { color: #a32021; font-weight: 700; }

/* ── Tarea por clase (Fase 4) ──────────────────────────────────────────── */

.vae-clase .vae-tarea {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	margin-top: 4px;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.35;
	border: 1px solid transparent;
	transition: background .15s ease;
}

.vae-clase .vae-tarea--pendiente { background: #eef4fa; color: #14507c; border-color: #cfe0ee; }
.vae-clase .vae-tarea--pendiente:hover { background: #dfebf6; color: #0f3f63; }

.vae-clase .vae-tarea--entregada { background: #fdf8ea; color: #7a5c12; border-color: #ecdcb0; }
.vae-clase .vae-tarea--entregada:hover { background: #f7efd8; color: #7a5c12; }

.vae-clase .vae-tarea--aprobada { background: #eaf5ec; color: #1e6f28; border-color: #c8e3ce; }
.vae-clase .vae-tarea--aprobada:hover { background: #dcefe1; color: #1e6f28; }

.vae-clase .vae-tarea--vencida { background: #fdeaea; color: #a32021; border-color: #f2c9c9; }
.vae-clase .vae-tarea--vencida:hover { background: #f9dada; color: #8d1a1b; }

/* Estados de asistencia en la lista */
.vae-clase__badge.asis-presente    { color: #2e7d32; }
.vae-clase__badge.asis-tarde       { color: #8a6100; }
.vae-clase__badge.asis-justificada { color: #1a5c94; }
.vae-clase__badge.asis-ausente     { color: #b32d2e; }

/* ── Bloque "próxima clase" ────────────────────────────────────────────── */

.vae-horario__next {
	padding: 20px 24px;
	background: #f2f7fb;
	border-bottom: 1px solid var(--vae-line);
}

.vae-horario__next--done { background: #f1f8f3; }

.vae-horario__next.is-live {
	background: #fff5f5;
	border-left: 4px solid var(--vae-live);
}

.vae-horario__next-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	color: var(--vae-blue);
	margin-bottom: 6px;
}

.vae-horario__next.is-live .vae-horario__next-label {
	color: var(--vae-live);
	animation: vae-pulse 1.6s ease-in-out infinite;
}

@keyframes vae-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }

.vae-horario__next-title {
	font-size: 17px;
	font-weight: 700;
	color: #10222f;
	margin-bottom: 3px;
}

.vae-horario__next-date {
	font-size: 14px;
	color: var(--vae-muted);
}

.vae-horario__cd {
	margin: 12px 0 0;
	font-size: 25px;
	font-weight: 700;
	color: var(--vae-blue);
	font-variant-numeric: tabular-nums;
	letter-spacing: .5px;
}

.vae-horario__next.is-live .vae-horario__cd { color: var(--vae-live); }

.vae-horario__next-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

/* ── Botones ───────────────────────────────────────────────────────────── */

.vae-horario .vae-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 22px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.vae-horario .vae-btn--primary { background: var(--vae-blue); color: #fff; }
.vae-horario .vae-btn--primary:hover { background: #005a92; color: #fff; }

.vae-horario .vae-btn--ghost {
	background: #fff;
	color: var(--vae-blue);
	border: 2px solid var(--vae-blue);
}
.vae-horario .vae-btn--ghost:hover { background: #e9f2f8; color: var(--vae-blue); }

.vae-horario .vae-btn--small {
	padding: 6px 14px;
	font-size: 13px;
	background: #fff;
	color: var(--vae-blue);
	border: 1px solid #b9cfe0;
}
.vae-horario .vae-btn--small:hover { background: var(--vae-blue); color: #fff; border-color: var(--vae-blue); }

.vae-horario .vae-btn--rec { color: #5b4a1f; border-color: #e3cf94; background: #fdf8ea; }
.vae-horario .vae-btn--rec:hover { background: #b8860b; color: #fff; border-color: #b8860b; }

.vae-horario .vae-btn--live {
	padding: 7px 16px;
	font-size: 13px;
	background: var(--vae-live);
	color: #fff;
	animation: vae-pulse 1.8s ease-in-out infinite;
}
.vae-horario .vae-btn--live:hover { background: #a71d1e; color: #fff; }

/* ── Lista de clases ───────────────────────────────────────────────────── */

.vae-horario__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.vae-horario__list > li::before,
.vae-horario__list > li::marker { content: none; }

.vae-clase {
	display: grid;
	grid-template-columns: 34px 76px 1fr auto;
	align-items: center;
	gap: 14px;
	padding: 12px 24px;
	border-bottom: 1px solid #eef2f6;
	margin: 0;
}

.vae-clase:last-child { border-bottom: 0; }

.vae-clase.is-next { background: #f7fbff; box-shadow: inset 3px 0 0 var(--vae-blue); }

.vae-clase--pasada { color: #93a2af; background: #fbfcfd; }
.vae-clase--pasada .vae-clase__title a { color: #7d8b98; }

.vae-clase--cancelada { background: #fffaf6; }
.vae-clase--cancelada .vae-clase__title { text-decoration: line-through; color: #a58a78; }

.vae-clase--en_vivo { background: #fff6f6; }

.vae-clase__num {
	font-size: 13px;
	font-weight: 700;
	color: var(--vae-muted);
	font-variant-numeric: tabular-nums;
}

.vae-clase--pasada .vae-clase__num { color: #b4c0cb; }

.vae-clase__date { display: flex; flex-direction: column; line-height: 1.25; }

.vae-clase__day  { font-size: 14px; font-weight: 600; color: #1d2b36; }
.vae-clase__time { font-size: 12.5px; color: var(--vae-muted); font-variant-numeric: tabular-nums; }

.vae-clase--pasada .vae-clase__day,
.vae-clase--pasada .vae-clase__time { color: #a3b0bb; }

.vae-clase__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.vae-clase__title {
	font-size: 14.5px;
	overflow-wrap: anywhere;
}

.vae-clase__title a { color: #14364c; text-decoration: none; }
.vae-clase__title a:hover { color: var(--vae-blue); text-decoration: underline; }

.vae-clase__badge {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--vae-muted);
}

.vae-clase--en_vivo   .vae-clase__badge { color: var(--vae-live); }
.vae-clase--pasada    .vae-clase__badge { color: #aab6c1; }
.vae-clase--cancelada .vae-clase__badge { color: var(--vae-accent); }

.vae-clase__action { text-align: right; }

.vae-clase__muted { font-size: 12.5px; color: #a9b5c0; }

/* ── Pie ───────────────────────────────────────────────────────────────── */

.vae-horario__foot {
	margin: 0;
	padding: 12px 24px 16px;
	font-size: 12.5px;
	color: var(--vae-muted);
	background: #fafcfd;
	border-top: 1px solid #eef2f6;
}

/* ── Móvil ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.vae-horario { font-size: 14.5px; border-radius: 12px; }

	.vae-horario__head,
	.vae-horario__next,
	.vae-horario__foot { padding-left: 16px; padding-right: 16px; }

	.vae-horario__cd { font-size: 21px; }

	.vae-horario__next-actions { flex-direction: column; }
	.vae-horario .vae-btn--primary,
	.vae-horario .vae-btn--ghost { width: 100%; }

	.vae-clase {
		grid-template-columns: 30px 1fr;
		grid-template-areas:
			"num  date"
			".    main"
			".    action";
		gap: 4px 12px;
		padding: 14px 16px;
	}

	.vae-clase__num    { grid-area: num; align-self: start; padding-top: 2px; }
	.vae-clase__main   { grid-area: main; }
	.vae-clase__date   { grid-area: date; flex-direction: row; gap: 6px; }
	.vae-clase__action { grid-area: action; text-align: left; margin-top: 6px; }

	.vae-clase__action:empty { display: none; }
}
