/* =========================================================================
   MKN — Application wizard (Solicitud) styling.
   Styles the Fluent Forms "Solicitud de membresía" form (ID 3) to the MKN
   design system, and the custom multi-step paging UI injected by forms.js.

   Fluent Forms FREE does not ship native multi-step paging (that is a Pro
   feature). forms.js re-groups the flat field output into 3 step panels and
   builds the progress bar + Anterior/Siguiente controls; this file styles
   both the fields and that paging chrome.

   Utility tokens (palette, fonts, glass) come from tokens.css.
   Scope: everything is namespaced under .mkn-form-card / .frm-fluent-form so
   it cannot leak onto other Fluent Forms.
   ========================================================================= */

/* --- Page 15 hero + explainer (dark band, matches homepage) ------------- */
.mkn-solicitud-hero {
	background:
		radial-gradient(circle at center, #2a1a4a 0%, #180f30 75%);
	color: var(--mkn-bg);
	text-align: center;
	padding: clamp(90px, 12vw, 150px) 20px clamp(50px, 7vw, 80px);
}
.mkn-solicitud-hero .mkn-kicker { color: var(--mkn-lavender); }
.mkn-solicitud-hero h1 {
	font-family: var(--mkn-font-display);
	font-weight: 700;
	font-size: clamp(2.4rem, 5.4vw, 4rem);
	line-height: 1.06;
	letter-spacing: -0.015em;
	color: var(--mkn-bg);
	margin: 0.5rem 0 0.9rem;
}
.mkn-solicitud-hero .mkn-reassure {
	font-family: var(--mkn-font-body);
	font-size: clamp(1rem, 1.6vw, 1.18rem);
	line-height: 1.6;
	color: var(--mkn-lavender);
	max-width: 560px;
	margin: 0 auto;
}

/* --- 3-step explainer chips (Solicita → Verificación → Bienvenida) ------ */
.mkn-explainer {
	background: var(--mkn-darkest);
	padding: 0 20px clamp(48px, 7vw, 72px);
}
.mkn-explainer-inner {
	max-width: 940px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	align-items: stretch;
}
.mkn-chip {
	flex: 1 1 220px;
	max-width: 300px;
	background: var(--mkn-glass-bg);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border: var(--mkn-glass-border);
	border-radius: 16px;
	padding: 22px 24px;
	text-align: left;
}
.mkn-chip-step {
	font-family: var(--mkn-font-body);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mkn-gold-hi);
	display: block;
	margin-bottom: 6px;
}
.mkn-chip-title {
	font-family: var(--mkn-font-display);
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--mkn-bg);
	margin: 0 0 6px;
}
.mkn-chip-body {
	font-family: var(--mkn-font-body);
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--mkn-lavender);
	margin: 0;
}
.mkn-chip-arrow {
	align-self: center;
	color: var(--mkn-lavender);
	opacity: 0.5;
	font-size: 1.4rem;
	flex: 0 0 auto;
}
@media (max-width: 760px) { .mkn-chip-arrow { display: none; } }

/* --- White card container that holds the form -------------------------- */
.mkn-form-section {
	background: var(--mkn-bg);
	padding: clamp(48px, 7vw, 90px) 20px clamp(60px, 9vw, 110px);
}
.mkn-form-card {
	max-width: 720px;
	margin: 0 auto;
	background: #ffffff;
	border: 1px solid rgba(195, 168, 245, 0.35);
	border-radius: var(--mkn-radius);
	box-shadow:
		0 1px 0 rgba(255,255,255,0.9) inset,
		0 18px 50px rgba(24, 15, 48, 0.10),
		0 6px 18px rgba(24, 15, 48, 0.06);
	padding: clamp(28px, 5vw, 52px);
}

/* ========================================================================
   Fluent Forms field styling (scoped to our form card)
   ======================================================================== */
.mkn-form-card .frm-fluent-form {
	font-family: var(--mkn-font-body);
	color: var(--mkn-primary);
}
.mkn-form-card .ff-el-group { margin-bottom: 22px; }

/* Labels */
.mkn-form-card .ff-el-input--label label {
	font-family: var(--mkn-font-body);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--mkn-primary);
	letter-spacing: 0.005em;
	margin-bottom: 7px;
	display: inline-block;
}
.mkn-form-card .ff-el-is-required.asterisk-right label::after,
.mkn-form-card .ff-el-is-required label .ff-el-is-required-mark { color: #9d3b5e; }

/* Inputs, selects, textareas */
.mkn-form-card .ff-el-form-control,
.mkn-form-card input[type="text"],
.mkn-form-card input[type="email"],
.mkn-form-card input[type="url"],
.mkn-form-card input[type="tel"],
.mkn-form-card select,
.mkn-form-card textarea {
	width: 100%;
	font-family: var(--mkn-font-body);
	font-size: 16px;
	color: var(--mkn-primary);
	background: #fdfcff;
	border: 1.5px solid rgba(195, 168, 245, 0.55); /* lavender border */
	border-radius: 12px;
	padding: 13px 15px;
	min-height: 46px; /* v1.42.0: ≥44px tap target (lifts the 40px selects); font stays 16px */
	line-height: 1.4;
	transition: border-color 200ms var(--mkn-ease), box-shadow 200ms var(--mkn-ease), background 200ms var(--mkn-ease);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
/* Keep the tall textarea default — must out-specify the 46px min-height on the
   shared .ff-el-form-control group above (v1.42.0). */
.mkn-form-card textarea,
.mkn-form-card textarea.ff-el-form-control { min-height: 130px; resize: vertical; }

.mkn-form-card .ff-el-form-control::placeholder,
.mkn-form-card textarea::placeholder { color: #a9a0c0; }

/* Select chevron */
.mkn-form-card select {
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239d7bea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	padding-right: 40px;
}

/* Focus: violet ring */
.mkn-form-card .ff-el-form-control:focus,
.mkn-form-card input:focus,
.mkn-form-card select:focus,
.mkn-form-card textarea:focus {
	outline: none;
	border-color: var(--mkn-accent);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(157, 123, 234, 0.22);
}

/* Checkbox (conformidad) — render as a dignified agreement box */
.mkn-form-card .ff-el-form-check,
.mkn-form-card .ff-el-form-check-label { font-family: var(--mkn-font-body); }
.mkn-form-card .ff-el-form-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	background: #faf8fd;
	border: 1.5px solid rgba(195, 168, 245, 0.5);
	border-radius: 12px;
	padding: 15px 16px;
	margin: 6px 0 0;
}
.mkn-form-card .ff-el-form-check input[type="checkbox"] {
	width: 20px; height: 20px;
	margin-top: 1px;
	accent-color: var(--mkn-accent);
	flex: 0 0 auto;
}
.mkn-form-card .ff-el-form-check-label {
	font-size: 0.96rem;
	line-height: 1.5;
	color: var(--mkn-primary);
	cursor: pointer;
}

/* Polish v1.22.0 — Statement-of-Faith step (data-step 3, the covenant gate)
   reads weightier than the data-entry steps 1–3: its two affirmation boxes take
   a warm gold accent instead of the neutral lavender, and the step title carries
   a short gold rule. CSS-only + scoped to the last step — the SoF gate logic and
   the step-2 conformidad box are untouched. */
.mkn-form-card .mkn-step-panel[data-step="3"] .ff-el-form-check {
	background: linear-gradient(0deg, #fdf9f0, #fefdfb);
	border-color: rgba(198, 160, 74, 0.55);
	border-left: 3px solid var(--mkn-gold);
	box-shadow: 0 8px 24px rgba(154, 122, 45, 0.09);
}
.mkn-form-card .mkn-step-panel[data-step="3"] .mkn-step-title::after {
	content: ""; display: block; width: 46px; height: 2px; margin-top: 12px;
	background: linear-gradient(90deg, var(--mkn-gold), rgba(198, 160, 74, 0));
	border-radius: 2px;
}

/* Help text */
.mkn-form-card .ff-el-help-message {
	font-size: 0.82rem;
	color: #6f6689;
	margin-top: 5px;
}

/* --- Error states: deep rose, dignified (no harsh red) ----------------- */
.mkn-form-card .ff-el-is-error .ff-el-form-control,
.mkn-form-card .ff-el-is-error input,
.mkn-form-card .ff-el-is-error select,
.mkn-form-card .ff-el-is-error textarea,
.mkn-form-card .mkn-field-error input,
.mkn-form-card .mkn-field-error select,
.mkn-form-card .mkn-field-error textarea {
	border-color: #9d3b5e;
	box-shadow: 0 0 0 3px rgba(157, 59, 94, 0.14);
}
.mkn-form-card .error.text-danger,
.mkn-form-card .ff-el-is-error .error,
.mkn-form-card .mkn-error-msg {
	color: #9d3b5e;
	font-size: 0.85rem;
	font-weight: 500;
	margin-top: 6px;
	display: block;
}

/* ========================================================================
   Custom multi-step paging UI (built by forms.js)
   ======================================================================== */

/* Progress bar */
.mkn-progress {
	margin: 0 0 30px;
}
.mkn-progress-track {
	position: relative;
	height: 6px;
	background: rgba(195, 168, 245, 0.28);
	border-radius: 999px;
	overflow: hidden;
}
.mkn-progress-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 33.333%;
	background: linear-gradient(90deg, var(--mkn-accent), var(--mkn-lavender));
	border-radius: 999px;
	transition: width 380ms var(--mkn-ease);
}
.mkn-progress-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	gap: 8px;
}
.mkn-progress-labels li {
	list-style: none;
	flex: 1 1 0;
	/* v1.65.0: the number rendered inline beside the label (cramped, ragged
	   wraps) -- intended design is the numbered circle STACKED above a
	   centered label. Column flex gives every step the same rhythm. */
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	line-height: 1.45;
	text-align: center;
	font-family: var(--mkn-font-body);
	font-weight: 600;
	font-size: 0.74rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #726c82;
	transition: color 300ms var(--mkn-ease);
	position: relative;
}
.mkn-progress-labels li .mkn-step-num {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 26px; height: 26px;
	border-radius: 999px;
	background: rgba(195, 168, 245, 0.25);
	color: #685f83;
	font-size: 0.82rem;
	margin: 0;
	transition: background 300ms var(--mkn-ease), color 300ms var(--mkn-ease);
}
.mkn-progress-labels li.is-active { color: var(--mkn-primary); }
.mkn-progress-labels li.is-active .mkn-step-num,
.mkn-progress-labels li.is-done .mkn-step-num {
	background: var(--mkn-gold-gradient);
	color: var(--mkn-darkest);
}
.mkn-progress-labels li.is-done { color: var(--mkn-soft); }

@media (max-width: 560px) {
	.mkn-progress-labels li { font-size: 0.62rem; letter-spacing: 0.03em; }
}

/* Step panels */
.mkn-step-panel { display: none; }
.mkn-step-panel.is-active {
	display: block;
	animation: mkn-step-in 320ms var(--mkn-ease) both;
}
@keyframes mkn-step-in {
	from { opacity: 0; transform: translateX(14px); }
	to   { opacity: 1; transform: translateX(0); }
}
.mkn-step-title {
	font-family: var(--mkn-font-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	color: var(--mkn-primary);
	margin: 0 0 4px;
	letter-spacing: -0.01em;
}
/* Visually hidden but screen-reader-available (step-change + error announcer). */
.mkn-sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.mkn-step-sub {
	font-family: var(--mkn-font-body);
	font-size: 0.92rem;
	color: #6f6689;
	margin: 0 0 24px;
}

/* Nav row (Anterior / Siguiente) */
.mkn-step-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	margin-top: 8px;
}
.mkn-step-nav.mkn-nav-end { justify-content: flex-end; }
.mkn-btn-step {
	font-family: var(--mkn-font-body);
	font-weight: 600;
	font-size: 0.98rem;
	border-radius: 999px;
	padding: 13px 30px;
	cursor: pointer;
	border: 0;
	transition: transform 220ms var(--mkn-ease), box-shadow 220ms var(--mkn-ease), filter 220ms var(--mkn-ease), background 220ms var(--mkn-ease);
}
.mkn-btn-next {
	background: var(--mkn-primary);
	color: var(--mkn-bg);
	box-shadow: 0 6px 18px rgba(42, 26, 74, 0.24);
}
.mkn-btn-next:hover { transform: translateY(-2px); filter: brightness(1.1); }
.mkn-btn-prev {
	background: transparent;
	color: var(--mkn-soft);
	border: 1.5px solid rgba(195, 168, 245, 0.6);
}
.mkn-btn-prev:hover { border-color: var(--mkn-accent); background: rgba(157,123,234,0.06); }

/* --- Submit button: gold-accent primary (matches .mkn-btn-primary) ------ */
.mkn-form-card .ff-el-group.ff_submit_btn_wrapper,
.mkn-form-card .ff-el-group.ff-el-submit { margin-bottom: 0; text-align: center; }
.mkn-form-card .ff-btn-submit,
.mkn-form-card button[type="submit"] {
	background: var(--mkn-gold-gradient) !important;
	color: var(--mkn-darkest) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-family: var(--mkn-font-body) !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	font-size: 1.02rem !important;
	padding: 15px 40px !important;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(201, 162, 39, 0.30);
	transition: transform 260ms var(--mkn-ease), box-shadow 260ms var(--mkn-ease), filter 260ms var(--mkn-ease);
}
.mkn-form-card .ff-btn-submit:hover,
.mkn-form-card button[type="submit"]:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
	box-shadow: 0 12px 32px rgba(201, 162, 39, 0.42);
}

/* Success / confirmation message */
.mkn-form-card .ff-message-success,
.mkn-form-card .ff_submit_success {
	font-family: var(--mkn-font-body);
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--mkn-primary);
	background: #f4eefe;
	border: 1px solid rgba(195, 168, 245, 0.5);
	border-radius: 14px;
	padding: 26px 28px;
	text-align: center;
}

/* While forms.js is initialising, hide the raw field list to avoid a flash
   of the full un-paged form. .mkn-form-ready is added by JS once panels are
   built; if JS fails, a no-JS fallback (below) keeps the form usable. */
.mkn-form-card.mkn-js-pending .frm-fluent-form > fieldset > .ff-el-group:not(.mkn-seen) { }

.mkn-form-card.mkn-form-ready .mkn-step-panel:not(.is-active) { display: none; }

/* No-JS fallback: show everything, hide paging chrome */
.no-js .mkn-progress,
.mkn-form-card:not(.mkn-form-ready) .mkn-step-nav { }

@media (prefers-reduced-motion: reduce) {
	.mkn-step-panel.is-active { animation: none; }
	.mkn-progress-fill { transition: none; }
}

/* iOS zoom-on-focus guard (Wave A, v1.40.0): every FluentForm text-entry
   field must compute to >=16px CSS px so mobile Safari never auto-zooms on
   focus. Pinned in px (not rem) and matched on .frm-fluent-form so it also
   covers any FF form not wrapped in .mkn-form-card, independent of root
   font-size. Checkboxes/radios (.ff-el-form-check-input) are excluded. */
.frm-fluent-form .ff-el-form-control,
.frm-fluent-form input[type="text"],
.frm-fluent-form input[type="email"],
.frm-fluent-form input[type="url"],
.frm-fluent-form input[type="tel"],
.frm-fluent-form input[type="number"],
.frm-fluent-form input[type="search"],
.frm-fluent-form input[type="password"],
.frm-fluent-form select,
.frm-fluent-form textarea { font-size: 16px; }

/* ============================================================================
   MOBILE SWEEP 2026-07-13 (v1.47.0) — solicitud wizard step-nav overflow.
   On the final step, .mkn-step-nav holds "Anterior" + the long submit
   ("Enviar mi solicitud"); with flex nowrap + gap the row needs ~371px and the
   submit clips off the right edge on every phone width. Stack the buttons
   full-width on phones for the step that carries a submit (primary on top);
   the intermediate Anterior/Siguiente steps still fit side-by-side, unchanged.
   ========================================================================== */
@media (max-width: 600px) {
	.mkn-step-nav:has(.ff-btn-submit),
	.mkn-step-nav:has(button[type="submit"]) {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 12px;
	}
	.mkn-step-nav:has(.ff-btn-submit) > *,
	.mkn-step-nav:has(button[type="submit"]) > * { width: 100%; }
	.mkn-step-nav .ff-btn-submit,
	.mkn-step-nav button[type="submit"] { width: 100%; }
}
