/**
 * Formulario ESTA — estilos base (prefijo .esta-)
 */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap");

:root {
	--esta-bg-card: #ffffff;
	--esta-border: #d1d5db;
	--esta-text: #374151;
	--esta-text-muted: #6b7280;
	--esta-heading: #1e3a5f;
	--esta-accent: #1e3a5f;
	--esta-accent-contrast: #ffffff;
	--esta-label: #555555;
	--esta-radius: 6px;
	--esta-font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--esta-font-serif: Georgia, "Times New Roman", Times, serif;
}

.esta {
	box-sizing: border-box;
	font-family: var(--esta-font-sans);
	color: var(--esta-text);
	max-width: 920px;
	margin: 2rem auto;
	padding: 0 1rem;
	background: transparent;
}

.esta *,
.esta *::before,
.esta *::after {
	box-sizing: inherit;
}

/* Barra de progreso — sin fondo */
.esta-progress {
	display: flex;
	list-style: none;
	margin: 0 0 1.75rem;
	padding: 0;
	position: relative;
	justify-content: space-between;
	counter-reset: esta-step;
	background: transparent;
}

.esta-progress::before {
	content: "";
	position: absolute;
	left: 12%;
	right: 12%;
	top: 14px;
	height: 2px;
	background: #e5e7eb;
	z-index: 0;
}

.esta-progress__item {
	flex: 1;
	text-align: center;
	position: relative;
	z-index: 1;
	max-width: 25%;
	padding: 0 4px;
}

.esta-progress__marker {
	display: block;
	width: 28px;
	height: 28px;
	margin: 0 auto 0.5rem;
	border-radius: 50%;
	background: var(--esta-bg-card);
	border: 2px solid #93a4c4;
	transition: background 0.2s, border-color 0.2s;
}

.esta-progress__item--active .esta-progress__marker,
.esta-progress__item--complete .esta-progress__marker {
	background: var(--esta-accent);
	border-color: var(--esta-accent);
}

.esta-progress__number {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--esta-text-muted);
	margin-bottom: 0.25rem;
}

.esta-progress__item--active .esta-progress__number,
.esta-progress__item--complete .esta-progress__number {
	color: var(--esta-accent);
}

.esta-progress__title {
	display: block;
	font-size: 0.72rem;
	line-height: 1.25;
	color: var(--esta-text-muted);
}

.esta-progress__item--active .esta-progress__title,
.esta-progress__item--complete .esta-progress__title {
	color: var(--esta-text);
	font-weight: 600;
}

@media (min-width: 640px) {
	.esta-progress__title {
		font-size: 0.8rem;
	}
}

/* Tarjeta — solo el bloque blanco */
.esta-card {
	background: var(--esta-bg-card);
	border-radius: var(--esta-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	padding: 1.75rem 1.5rem 2rem;
}

.esta-step__heading {
	font-family: var(--esta-font-serif);
	font-size: 1.35rem;
	font-weight: 400;
	color: var(--esta-heading);
	margin: 0 0 1.5rem;
	line-height: 1.3;
}

.esta-step__placeholder {
	font-size: 1.125rem;
	margin: 0 0 1.5rem;
	color: var(--esta-text);
}

/* Grid 2 columnas */
.esta-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem 1.5rem;
}

@media (min-width: 720px) {
	.esta-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.esta-field--full {
	grid-column: 1 / -1;
}

.esta-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}

/* .esta-field fuerza display:flex y anula el [hidden] nativo (menor especificidad). */
[data-esta-otra-nac-doc-wrap][hidden],
[data-esta-redes-usuario-wrap][hidden] {
	display: none !important;
}

.esta-field--empty {
	min-height: 1px;
}

@media (max-width: 719px) {
	.esta-field--empty {
		display: none;
	}
}

/* Títulos sobre inputs: Roboto bold 15px #555555 */
.esta-field__label {
	font-family: var(--esta-font-sans);
	font-weight: 700;
	font-size: 15px;
	color: var(--esta-label);
	line-height: 1.35;
}

.esta-field__required {
	color: #b91c1c;
	margin-left: 2px;
}

.esta-field__input,
.esta-field__select {
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--esta-border);
	border-radius: 4px;
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--esta-text);
	background: #fff;
}

.esta-field__select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	padding-right: 1.75rem;
}

.esta-field__input:focus,
.esta-field__select:focus {
	outline: 2px solid rgba(30, 58, 95, 0.35);
	outline-offset: 1px;
	border-color: var(--esta-accent);
}

.esta-field__hint {
	margin: 0;
	font-size: 0.75rem;
	color: var(--esta-text-muted);
	line-height: 1.4;
}

/* intl-tel-input */
.esta-field__input--phone.iti__tel-input {
	padding-left: 52px;
}

.esta .iti {
	width: 100%;
	position: relative;
	z-index: 10000;
}

.esta .iti__flag-container {
	border-right: 1px solid var(--esta-border);
	border-radius: 4px 0 0 4px;
}

.esta .iti__country-list {
	z-index: 10002 !important;
}

.esta .iti__country-container,
.esta .iti__dropdown-content,
.esta .iti__search-input {
	z-index: 10003 !important;
}

/* Fechas (día / mes / año) */
.esta-dob {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
}

.esta-dob__part {
	flex: 1 1 30%;
	min-width: 5rem;
}

/* Hereda flecha de .esta-field__select */

/* Subida de archivo */
.esta-upload__intro {
	margin: 0 0 1rem;
	font-size: 15px;
	font-weight: 700;
	color: var(--esta-label);
	text-align: center;
	line-height: 1.4;
}

.esta-upload {
	background: #f3f4f6;
	border: 1px solid var(--esta-border);
	border-radius: 4px;
	padding: 1.25rem 1rem;
	text-align: center;
}

.esta-upload__text {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--esta-text-muted);
	line-height: 1.45;
}

/* Paso 3: foto personal — dos columnas */
.esta-step-photo {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem 2rem;
	align-items: start;
}

@media (min-width: 720px) {
	.esta-step-photo {
		grid-template-columns: minmax(200px, 280px) 1fr;
	}
}

.esta-step-photo__sample {
	background: #fff;
	border: 1px solid var(--esta-border);
	border-radius: 4px;
	padding: 0.75rem;
	text-align: center;
}

.esta-step-photo__sample-img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 2px;
}

.esta-step-photo__upload-col {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	min-width: 0;
}

.esta-upload--compact {
	text-align: center;
	padding: 1.25rem 1rem;
}

.esta-upload--compact.esta-upload--dragover {
	outline: 2px dashed var(--esta-accent);
	outline-offset: 2px;
	background: #f8fafc;
}

.esta-upload__prompt {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--esta-text);
	line-height: 1.4;
}

.esta-photo-rules {
	margin: 0;
	padding-left: 1.2rem;
	font-size: 0.8125rem;
	color: var(--esta-text-muted);
	line-height: 1.5;
}

.esta-photo-rules li + li {
	margin-top: 0.5rem;
}

.esta-actions--end {
	justify-content: flex-end;
}

.esta-actions--spread {
	justify-content: space-between;
	width: 100%;
}

.esta-radio-group--stack {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.esta-radio--block {
	align-items: flex-start;
	max-width: 100%;
}

.esta-radio--block .esta-radio__input {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.esta-radio--block .esta-radio__text {
	line-height: 1.4;
	white-space: normal;
}

/* Paso 4: sub-paneles (misma barra de progreso — paso 4) */
.esta-step--has-subpanels .esta-subpanel[hidden] {
	display: none !important;
}

.esta-subpanel--legal .esta-field--full {
	margin-bottom: 1.25rem;
}

.esta-legal-block {
	margin: 1.25rem 0;
	padding: 0;
}

.esta-legal-block--after {
	margin-top: 1rem;
}

.esta-legal-block__title {
	font-family: var(--esta-font-sans);
	font-weight: 700;
	font-size: 15px;
	color: var(--esta-label);
	margin: 0 0 0.5rem;
}

.esta-legal-block__p {
	font-size: 0.8125rem;
	color: var(--esta-text-muted);
	line-height: 1.55;
	margin: 0 0 0.75rem;
}

.esta-legal-block__p--inline {
	margin-top: 0.75rem;
}

.esta-legal-block__list {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
	font-size: 0.8125rem;
	color: var(--esta-text-muted);
	line-height: 1.5;
}

.esta-legal-block__list li + li {
	margin-top: 0.35rem;
}

.esta-field--elig {
	margin-bottom: 1.75rem;
}

.esta-subpanel__title {
	font-family: var(--esta-font-serif);
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--esta-heading);
	margin: 0 0 1.25rem;
	line-height: 1.3;
}

.esta-fee-line {
	margin: 1.75rem 0 0;
	font-size: 1rem;
	color: var(--esta-text);
}

.esta-fee-line__amount {
	color: #b91c1c;
	font-weight: 700;
	margin-left: 0.35rem;
}

/* Navegación paso 4: Siguiente vs enviar */
.esta-actions--step4-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 0.25rem;
}

.esta-actions__step4-right {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-left: auto;
}

.esta-step4-payrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.25rem;
}

.esta-btn--pay {
	background: var(--esta-accent);
	color: var(--esta-accent-contrast);
	border: 2px solid var(--esta-accent);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	font-size: 0.8rem;
	padding: 0 1.25rem;
	min-height: 48px;
}

.esta-btn--pay:hover {
	filter: brightness(1.08);
}

.esta-pay-badges {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.esta-pay-badge {
	display: inline-block;
	line-height: 1.2;
}

.esta-pay-badge--stripe {
	background: #635bff;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	padding: 0.4rem 0.65rem;
	border-radius: 4px;
	font-family: system-ui, -apple-system, sans-serif;
}

.esta-pay-badge--ssl {
	font-size: 0.65rem;
	font-weight: 600;
	color: #4b5563;
	border: 1px solid #d1d5db;
	padding: 0.4rem 0.55rem;
	border-radius: 4px;
	background: #fafafa;
}

.esta-finalize {
	margin: 0.5rem 0 1.75rem;
	max-width: 42rem;
}

.esta-finalize__lead {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--esta-heading);
	margin: 0 0 1rem;
	line-height: 1.45;
}

.esta-finalize__p {
	font-size: 0.9375rem;
	color: var(--esta-text);
	margin: 0;
	line-height: 1.55;
}

.esta-pay-badges--finalize {
	flex-direction: column;
	align-items: flex-end;
}

.esta-fee-line--finalize {
	margin-top: 1.5rem;
}

.esta-fee-line--finalize .esta-fee-line__amount {
	color: #cd323c;
	font-weight: 700;
	margin-left: 0.35rem;
}

.esta-pay-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.75rem;
	margin-top: 1.25rem;
}

.esta-pay-logos__img {
	display: block;
	height: auto;
	width: auto;
	max-height: 48px;
}

.esta-pay-logos__img--stripe {
	max-height: 32px;
}

.esta-pay-logos__img--ssl {
	max-height: 44px;
}

.esta-upload__actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.esta-upload__filename {
	margin: 0.7rem 0 0;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--esta-text-muted);
}

.esta-upload__filename--success {
	color: #15803d;
	font-weight: 700;
}

/* Radios */
.esta-radio-group {
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 0.15rem;
}

.esta-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	font-weight: 400;
	font-size: 0.9375rem;
}

.esta-radio__input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--esta-accent);
}

/* Casilla legal (paso final) */
.esta-field--legal-accept {
	margin-top: 1rem;
}

.esta-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	cursor: pointer;
	font-weight: 400;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.esta-checkbox__input {
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
	accent-color: var(--esta-accent);
}

.esta-checkbox__text a {
	color: var(--esta-accent);
	text-decoration: underline;
}

.esta-field__label--checkbox {
	font-weight: 400;
	margin-bottom: 0;
}

/* Botones */
.esta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 2rem;
	padding-top: 0.25rem;
}

.esta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 1.75rem;
	font-size: 0.875rem;
	font-weight: 700;
	font-family: inherit;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 4px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.esta-btn--primary {
	background: var(--esta-accent);
	color: var(--esta-accent-contrast);
	border-color: var(--esta-accent);
}

.esta-btn--primary:hover {
	filter: brightness(1.08);
}

.esta-btn--link {
	background: transparent;
	color: var(--esta-accent);
	border-color: transparent;
	padding-left: 0;
	min-height: auto;
	text-transform: uppercase;
}

.esta-btn--link:hover {
	text-decoration: underline;
}

/* Botón "Anterior" sin underline ni estilos de hover (mantener color #1e3a5f) */
.esta-btn--link[data-esta-prev],
.esta-btn--link[data-esta-prev]:hover {
	background: transparent;
	color: #1e3a5f;
	border-color: transparent;
	text-decoration: none;
}

.esta-btn--outline {
	background: #fff;
	color: var(--esta-accent);
	border: 2px solid var(--esta-accent);
	text-transform: uppercase;
}

.esta-btn--outline:hover {
	background: #f8fafc;
}

.esta-step[hidden] {
	display: none !important;
}

.esta-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;
}
