/**
 * Vista de invitado del selector de exámenes (usuario SIN login).
 * Sección de bienvenida + test de ejemplo + llamada a la acción.
 *
 * Contraste verificado (regla dura de legibilidad):
 *  - Texto cuerpo #515151 sobre blanco  ≈ 7.4:1
 *  - Títulos #0c5c94 sobre blanco        ≈ 7.8:1
 *  - Botón compra: texto #14202b sobre oro #f2c21c ≈ 9:1
 *  - Botón azul: blanco sobre #0c5c94    ≈ 7.8:1
 * Sin texto claro sobre fondo claro en ningún estado.
 */

.mwm-exam-guest {
	--guest-blue: var(--mwm--color--p100, #0c5c94);
	--guest-gold: var(--mwm--color--p200, #f2c21c);
	--guest-ink: #14202b;
	--guest-body: var(--mwm--color--n200, #515151);
	--guest-surface: var(--mwm--color--p300, #f0f4ff);
	max-width: 920px;
	margin: 0 auto;
	padding: 8px 0 24px;
	font-family: var(--mwm--font-family-1, "SF UI Text", sans-serif);
}

/* ---------- Intro ---------- */
.mwm-exam-guest__intro {
	text-align: center;
	margin-bottom: 28px;
}

.mwm-exam-guest__title {
	font-family: var(--mwm--font-family-2, "Quicksand", sans-serif);
	font-size: clamp(26px, 4vw, 38px);
	line-height: 1.15;
	color: var(--guest-blue);
	font-weight: 700;
	margin: 0 0 12px;
}

.mwm-exam-guest__title strong {
	color: var(--guest-blue);
	position: relative;
	white-space: nowrap;
}

/* Subrayado dorado bajo "gratis" — decorativo, no afecta al contraste del texto. */
.mwm-exam-guest__title strong::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 8px;
	background: var(--guest-gold);
	opacity: .55;
	border-radius: 4px;
	z-index: -1;
}

.mwm-exam-guest__lead {
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.55;
	color: var(--guest-body);
	max-width: 680px;
	margin: 0 auto;
}

/* ---------- Test de ejemplo ---------- */
.mwm-exam-guest__demo {
	position: relative;
	background: #ffffff;
	border: 1px solid #e1e6ef;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(12, 92, 148, .08);
	padding: 28px 22px 22px;
	margin-bottom: 28px;
}

.mwm-exam-guest__demo-tag {
	position: absolute;
	top: -14px;
	left: 24px;
	display: inline-block;
	background: var(--guest-blue);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 6px 14px;
	border-radius: 999px;
	box-shadow: 0 4px 10px rgba(12, 92, 148, .25);
}

/* El test de ejemplo no debe ofrecer "reportar pregunta" a quien no tiene cuenta. */
.mwm-exam-guest .mwm-report-question-btn {
	display: none !important;
}

/* Ajustes menores para que el test embebido respire dentro de la tarjeta. */
.mwm-exam-guest__demo .mwm-practice-exam-container {
	margin: 0;
}

/* Correcciones de contraste heredadas del CSS del examen (exam-display.css),
 * acotadas al demo de invitado para NO alterar el examen de los logueados.
 * Cada par texto/fondo se ajusta al mínimo WCAG 4.5:1.
 *  - breadcrumb (materia):        #6c757d → #515151  (4.45 → 7.2:1)
 *  - stat "sin responder":        #6c757d → #515151  (4.45 → 7.2:1)
 *  - botón "Me la sabía":         blanco/#28a745 → blanco/#1e7e34 (3.13 → 5.1:1)
 *  - badge "sin responder" (res): blanco/#6c757d → blanco/#495057 (~4.4 → 7.4:1)
 */
.mwm-exam-guest__demo .question-breadcrumb,
.mwm-exam-guest__demo .progress-stats .unanswered,
.mwm-exam-guest__demo .progress-stats .unanswered .unanswered-count {
	color: #515151;
}

.mwm-exam-guest__demo .feedback-btn.knowing {
	background: #1e7e34;
}

.mwm-exam-guest__demo .feedback-btn.knowing:hover {
	background: #19692c;
}

.mwm-exam-guest__demo .result-badge.unanswered {
	background: #495057;
	color: #ffffff;
}

/* ---------- Llamada a la acción ---------- */
.mwm-exam-guest__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background: var(--guest-surface);
	border: 1px solid #d8e0f2;
	border-radius: 16px;
	padding: 24px 26px;
}

.mwm-exam-guest__cta-text {
	flex: 1 1 280px;
	min-width: 240px;
}

.mwm-exam-guest__cta-title {
	font-size: clamp(18px, 2.2vw, 22px);
	line-height: 1.25;
	color: var(--guest-blue);
	font-weight: 700;
	margin: 0 0 6px;
}

.mwm-exam-guest__cta-title strong {
	color: var(--guest-blue);
}

.mwm-exam-guest__cta-sub {
	font-size: 15px;
	line-height: 1.5;
	color: var(--guest-body);
	margin: 0;
}

.mwm-exam-guest__cta-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
}

.mwm-exam-guest__btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	text-align: center;
	text-decoration: none;
	border-radius: 12px;
	padding: 14px 22px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	transition: transform .12s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
	border: 2px solid transparent;
}

.mwm-exam-guest__btn:hover {
	transform: translateY(-1px);
}

/* Botón principal: oro de marca con texto casi negro (alto contraste). */
.mwm-exam-guest__btn--buy {
	background: var(--guest-gold);
	color: var(--guest-ink);
	box-shadow: 0 6px 16px rgba(242, 194, 28, .4);
}

.mwm-exam-guest__btn--buy:hover,
.mwm-exam-guest__btn--buy:focus {
	background: #e0b30f;
	color: var(--guest-ink);
}

.mwm-exam-guest__btn-label {
	font-size: 16px;
}

.mwm-exam-guest__btn-price {
	font-size: 13px;
	font-weight: 600;
	opacity: .85;
	color: var(--guest-ink);
}

/* El precio puede venir con etiquetas <del>/<ins> de WooCommerce. */
.mwm-exam-guest__btn-price del {
	opacity: .6;
	margin-right: 4px;
}

.mwm-exam-guest__btn-price .amount {
	color: var(--guest-ink);
}

/* Botón secundario: contorno azul, texto azul sobre claro. */
.mwm-exam-guest__btn--ghost {
	background: #ffffff;
	color: var(--guest-blue);
	border-color: var(--guest-blue);
}

.mwm-exam-guest__btn--ghost:hover,
.mwm-exam-guest__btn--ghost:focus {
	background: var(--guest-blue);
	color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.mwm-exam-guest__cta {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.mwm-exam-guest__cta-buttons {
		justify-content: center;
	}

	.mwm-exam-guest__btn {
		flex: 1 1 auto;
	}
}

/* ---------- Selector de oposición (pills) ----------
 * Contraste (regla dura ≥4.5:1), ratios WCAG re-derivados:
 *  - pill normal: #0c5c94 sobre blanco           ≈ 7.1:1
 *  - pill hover:  #0a4a77 sobre #e8f1f8          ≈ 8.1:1
 *  - pill activa: blanco sobre #0c5c94           ≈ 7.1:1
 *  - etiqueta:    #515151 sobre blanco           ≈ 7.9:1
 */
.mwm-exam-guest__oposiciones {
	text-align: center;
	margin: 0 0 26px;
	/* Ancla de las pills: al recargar con #mwm-guest-oposiciones no debe quedar
	   tapada por el header fijo. */
	scroll-margin-top: 110px;
}

.mwm-exam-guest__oposiciones-label {
	color: var(--guest-body);
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
}

.mwm-exam-guest__oposiciones-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.mwm-exam-guest__pill {
	display: inline-block;
	padding: 9px 18px;
	border: 2px solid var(--guest-blue);
	border-radius: 999px;
	background: #ffffff;
	color: var(--guest-blue);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.mwm-exam-guest__pill:hover,
.mwm-exam-guest__pill:focus {
	background: #e8f1f8;
	color: #0a4a77;
	text-decoration: none;
}

.mwm-exam-guest__pill.is-active,
.mwm-exam-guest__pill.is-active:hover,
.mwm-exam-guest__pill.is-active:focus {
	background: var(--guest-blue);
	color: #ffffff;
}

@media (max-width: 600px) {
	.mwm-exam-guest__pill {
		font-size: 13px;
		padding: 8px 14px;
	}
}
