/**
 * Asistente de 2 pasos + «seguir redes» obligatorio — componente compartido.
 *
 * Lo usan DOS formularios en shells distintos: la inscripción a una certificación (.fc-shell, cuando
 * `require_follow` está activo) y la solicitud de acceso al curso MUN 101 (.mr-c101). Por eso vive en su
 * propio archivo con las variables que necesita, y se encola en ambas rutas junto a `follow-steps.js`
 * (que es el que da la secuencia y el gating del botón de envío).
 *
 * Estiliza solo el componente: los CAMPOS del paso 2 (usuario de Instagram) los estiliza cada shell con
 * sus propias clases, para que se vean como el resto de su formulario.
 *
 * Salió de certificaciones.css en la 1.23.0, sin cambios de diseño.
 */
:root {
	--fc-navy: #0D1E46;
	--fc-navy-2: #16264f;
	--fc-gold: #b78318;
	--fc-ink: #1f2937;
	--fc-muted: #64748b;
	--fc-line: #e2e8f0;
	--fc-ok: #16a34a;
}

/* ============================================================
   Asistente de 2 pasos + «seguir redes» obligatorio  [1.17.0]
   Secuencia de botones: cada uno se habilita al completar el anterior.
   ============================================================ */
/* Paso 2 oculto hasta pulsar «Continuar» (el <noscript> lo revela si no hay JS). */
.fc-form-step2 { display: none; }
.fc-wizard.fc-at-step2 .fc-form-step1 { display: none; }
.fc-wizard.fc-at-step2 .fc-form-step2 { display: block; }
.fc-continue-wrap { margin-top: 4px; }

/* Bloque de verificación (usuario de Instagram + casilla) */
.fc-verify { margin-top: 4px; }
.fc-ack { align-items: flex-start !important; gap: 10px; background: #fff; border: 1.6px solid var(--fc-line); border-radius: 12px; padding: 12px 14px; font-weight: 600; line-height: 1.5; }
.fc-ack input { margin-top: 3px; }
.fc-submit-wrap { margin-top: 4px; }
.fc-submit-hint { margin: 8px 0 0; font-size: 12.5px; }

/* Tarjeta con estado: ámbar = pendiente (acción requerida), verde = completo. */
.fc-follow { margin-top: 18px; padding: 18px; border-radius: 16px; background: #fffdf6; border: 1.6px solid #f1e4bd; transition: background .3s ease, border-color .3s ease; }
/* Encima va la tarjeta de contexto con su propio margen: sin esto se suman y queda un hueco doble. */
.fc-form-step2 .fc-benefits + .fc-follow { margin-top: 0; }
.fc-follow.is-complete { background: #f2fdf6; border-color: #bbf7d0; }

.fc-follow-status { margin-bottom: 10px; }
.fc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.fc-badge-pending { background: #fef3c7; color: #92400e; }
.fc-badge-done { display: none; background: #dcfce7; color: #166534; }
.fc-follow.is-complete .fc-badge-pending { display: none; }
.fc-follow.is-complete .fc-badge-done { display: inline-flex; }
.fc-follow.is-complete .fc-follow-prompt { display: none; }

.fc-follow-title { margin: 2px 0 8px; color: var(--fc-navy); font-size: 21px; font-weight: 800; line-height: 1.15; }
.fc-follow-lead { margin: 0; color: var(--fc-ink); font-size: 15px; line-height: 1.65; }
.fc-follow-lead strong { color: var(--fc-navy); }

/* ============================================================
   «Qué ganas al seguirnos» — contexto al abrir el paso 2  [1.26.0]
   Lo primero que aparece al pulsar «Continuar», encima de los botones de seguir/unirse: explica por qué le
   conviene justo antes de pedírselo. Autocontenida: la usan los dos shells (.fc-shell y .mr-c101), así que
   no hereda nada de ninguno.
   ============================================================ */
.fc-benefits {
	margin: 0 0 16px;
	padding: 20px 22px;
	border-radius: 18px;
	background: linear-gradient(160deg, #0D1E46 0%, #16264f 62%, #1b2f5e 100%);
	color: #fff;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	box-shadow: 0 16px 40px rgba(13, 30, 70, .22);
}
.fc-benefits-kicker {
	margin: 0 0 4px;
	color: var(--fc-gold);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.fc-benefits-head h2 { margin: 0 0 8px; color: #fff; font-size: 21px; font-weight: 820; line-height: 1.2; }
.fc-benefits-lead { margin: 0; color: rgba(255, 255, 255, .86); font-size: 14.5px; line-height: 1.65; }
.fc-benefits-lead strong { color: #fff; font-weight: 800; }

/* Son cuatro: en 2×2 quedan equilibrados. Con `auto-fit` caben tres arriba y el cuarto queda huérfano. */
.fc-benefits-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
}
.fc-benefits-grid li {
	display: grid;
	gap: 3px;
	padding: 13px 15px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .13);
}
.fc-benefits-ic { font-size: 20px; line-height: 1; margin-bottom: 3px; }
.fc-benefits-grid strong { color: #fff; font-size: 14px; font-weight: 800; }
.fc-benefits-grid li > span:not(.fc-benefits-ic) { color: rgba(255, 255, 255, .74); font-size: 12.5px; line-height: 1.5; }

.fc-benefits-foot {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, .16);
	color: rgba(255, 255, 255, .9);
	font-size: 13.5px;
	font-weight: 650;
	line-height: 1.6;
}

@media (max-width: 720px) {
	.fc-benefits { padding: 17px; border-radius: 16px; }
	.fc-benefits-head h2 { font-size: 19px; }
	.fc-benefits-lead { font-size: 14px; }
	.fc-benefits-grid { grid-template-columns: 1fr; gap: 8px; }
	.fc-benefits-grid li { padding: 12px 14px; }
}

/* Respaldo cuando el esquema de app no abre nada (app no instalada). */
.fc-step-fallback { margin: 6px 0 0; padding: 0 2px; font-size: 12.5px; line-height: 1.4; }
.fc-step-fallback a { color: var(--fc-navy); font-weight: 700; text-decoration: underline; }

/* Barra de progreso */
.fc-progress { margin: 18px 0 6px; }
.fc-progress-track { height: 10px; border-radius: 999px; background: #e8eef6; overflow: hidden; }
.fc-progress-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--fc-gold), #d9a531); transition: width .45s cubic-bezier(.22,.61,.36,1); }
.fc-progress-text { margin-top: 7px; font-size: 13px; font-weight: 700; color: var(--fc-muted); }
.fc-progress-text .fc-progress-count { color: var(--fc-navy); }

/* Grupos */
.fc-follow-group { margin-top: 18px; }
.fc-follow-group-title { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--fc-muted); }
.fc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

/* Botón-paso */
.fc-step-btn {
	display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
	padding: 12px 14px; border-radius: 14px; text-decoration: none;
	background: #fff; border: 1.5px solid var(--fc-line); color: var(--fc-navy);
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}
.fc-step-ic { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; }
.fc-net-instagram .fc-step-ic { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.fc-net-whatsapp .fc-step-ic { background: #25d366; }
.fc-step-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.fc-step-label { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.fc-step-sub { font-size: 12.5px; color: var(--fc-muted); font-weight: 600; overflow-wrap: anywhere; }
.fc-step-state { flex: 0 0 auto; margin-left: auto; }
.fc-step-go { display: inline-block; padding: 7px 16px; border-radius: 999px; background: var(--fc-navy); color: #fff; font-weight: 800; font-size: 13px; }
.fc-step-lock, .fc-step-check { display: none; font-size: 18px; line-height: 1; }

/* Estados (los aplica el JS; sin JS todos quedan como "listo" y son usables). */
.fc-step.is-ready .fc-step-btn { border-color: var(--fc-gold); box-shadow: 0 8px 22px rgba(183,131,24,.16); }
.fc-step.is-ready .fc-step-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(13,30,70,.14); }
.fc-step.is-ready .fc-step-go { animation: fc-pulse 1.8s ease-in-out infinite; }

.fc-step.is-locked .fc-step-btn { opacity: .55; cursor: not-allowed; background: #f6f8fb; }
.fc-step.is-locked .fc-step-ic { filter: grayscale(1); opacity: .6; }
.fc-step.is-locked .fc-step-go { display: none; }
.fc-step.is-locked .fc-step-lock { display: inline-block; color: var(--fc-muted); }

.fc-step.is-done .fc-step-btn { border-color: #bbf7d0; background: #f0fdf4; }
.fc-step.is-done .fc-step-go, .fc-step.is-done .fc-step-lock { display: none; }
.fc-step.is-done .fc-step-check {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px;
	background: var(--fc-ok); color: #fff; font-size: 16px; font-weight: 900;
	animation: fc-pop .35s cubic-bezier(.34,1.56,.64,1);
}

/* Sacudida al tocar un paso bloqueado */
.fc-step.fc-shake .fc-step-btn { animation: fc-shake .4s ease; }

/* Mensaje final: solo visible cuando se completan todos los pasos. */
.fc-follow-celebrate {
	display: none; margin-top: 16px; padding: 14px 16px; border-radius: 14px; text-align: center;
	background: #ecfdf5; color: var(--fc-ok); font-size: 16px;
}
.fc-follow.is-complete .fc-follow-celebrate { display: block; animation: fc-pop .4s cubic-bezier(.34,1.56,.64,1); }
.fc-follow-note { margin: 12px 0 0; font-size: 12.5px; }

@keyframes fc-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(183,131,24,.45); } 50% { box-shadow: 0 0 0 6px rgba(183,131,24,0); } }
@keyframes fc-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fc-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
	.fc-step.is-ready .fc-step-go, .fc-step.is-done .fc-step-check, .fc-follow.is-complete .fc-follow-celebrate, .fc-step.fc-shake .fc-step-btn { animation: none; }
	.fc-progress-fill { transition: none; }
}

/* Autonomía fuera de .fc-shell (el curso no tiene .mr-app-form/.mr-login-check): el bloque de
   verificación se apila solo y la casilla trae su propio layout. El !important es para ganarle al
   `label { display: grid }` de cada shell, que si no convierte la casilla en dos filas. */
.fc-verify { display: grid; gap: 14px; }
.fc-ack { display: flex !important; align-items: flex-start !important; gap: 10px; }
.fc-ack input { width: auto !important; flex: 0 0 auto; }

/* =============================================================================
 * DIS-13 · CONTRASTE REFORZADO Y COLORES FORZADOS
 * -----------------------------------------------------------------------------
 * Ratios con la fórmula de luminancia relativa de WCAG 2.1, contra el fondo REAL:
 *   · `.fc-step-btn` es el control principal del asistente y su único límite es
 *     `1.5px solid var(--fc-line)` #e2e8f0 sobre #fff = 1,2328:1. SC 1.4.11 pide
 *     3:1. Pasa a var(--fc-navy) #0D1E46 = 16,2632:1 (15,2862:1 sobre el #f6f8fb
 *     del paso bloqueado, que es el otro fondo real que tiene).
 *   · El paso COMPLETADO se marca con `border-color:#bbf7d0` sobre su propio fondo
 *     #f0fdf4 = 1,1577:1: la señal de «ya está hecho» es prácticamente invisible.
 *     Pasa a #0f5c35 = 7,7083:1 sobre ese mismo fondo.
 *   · `.fc-ack` (la casilla de compromiso) borde #e2e8f0 = 1,2328:1 → var(--fc-navy).
 *   · `.fc-benefits-kicker` var(--fc-gold) #b78318 = 3,3476:1 sobre #fff, bajo el
 *     4,5:1 de AA → #8a5c00 = 5,8147:1.
 *   · `.fc-follow-celebrate` var(--fc-ok) #16a34a sobre su fondo #ecfdf5 = 3,1286:1
 *     → #0f5c35 = 7,6598:1.
 *   · `.fc-progress-text`, `.fc-step-sub` y `.fc-follow-group-title` usan
 *     var(--fc-muted) #64748b = 4,7588:1 sobre #fff: ya pasaban. Se suben a
 *     #475569 = 7,5777:1 por coherencia con certificaciones.css, no por arreglo.
 * ========================================================================== */
@media (prefers-contrast: more) {
	.fc-step-btn { border-width: 2px; border-color: var(--fc-navy); }
	.fc-step.is-ready .fc-step-btn { border-color: #8a5c00; }
	.fc-step.is-done .fc-step-btn { border-color: #0f5c35; }
	.fc-step.is-locked .fc-step-btn { opacity: 1; border-style: dashed; }
	.fc-step.is-locked .fc-step-lock, .fc-step-sub, .fc-progress-text, .fc-follow-group-title { color: #475569; }
	.fc-ack { border-width: 2px; border-color: var(--fc-navy); }
	.fc-benefits-kicker { color: #8a5c00; }
	.fc-follow-celebrate { color: #0f5c35; }
	.fc-progress-fill { background: var(--fc-navy); }
	.fc-step-btn:focus-visible, .fc-ack input:focus-visible { outline: 3px solid var(--fc-navy); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
}

/* En colores forzados desaparecen los tres estados del asistente: listo, bloqueado
   y hecho se distinguen HOY por color de borde y de fondo, y el navegador anula los
   dos. Se reconstruyen con lo que sí sobrevive —grosor y estilo de trazo—:
   grueso continuo = listo, discontinuo = bloqueado, doble = hecho. Los iconos de
   red (`.fc-step-ic`) son degradados de marca y quedan planos: se les da límite. */
@media (forced-colors: active) {
	.fc-step-btn, .fc-ack { border: 1px solid CanvasText; }
	.fc-step.is-ready .fc-step-btn { border-width: 3px; border-style: solid; }
	.fc-step.is-locked .fc-step-btn { border-style: dashed; opacity: 1; }
	.fc-step.is-done .fc-step-btn { border-style: double; border-width: 4px; }
	.fc-step-ic { border: 1px solid CanvasText; }
	.fc-step-go { border: 1px solid ButtonText; }
	.fc-follow-celebrate { border: 1px solid CanvasText; border-left: 5px solid CanvasText; }
	.fc-progress-track, .fc-progress-fill { border: 1px solid CanvasText; }
	.fc-progress-fill { background: Highlight; forced-color-adjust: none; }
	.fc-step-btn:focus-visible, .fc-ack input:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; box-shadow: none; }
}
