/* Alpha Leads — modal + form styling, mirroring the design's EmpleoModal /
   TalentoModal. Uses the theme's self-hosted fonts and the same palette. */

.al-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(2, 6, 18, 0.85);
	backdrop-filter: blur(20px);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.al-overlay[hidden] { display: none; }
.al-overlay.is-open { opacity: 1; }
body.al-locked { overflow: hidden; }

.al-modal {
	position: relative;
	width: 100%;
	max-width: 512px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 28px;
	background: linear-gradient(160deg, #07091f 0%, #050719 100%);
	border: 1px solid rgba(101, 93, 198, 0.2);
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75), 0 0 60px rgba(101, 93, 198, 0.07);
	color: #fff;
	font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
	transform: translateY(28px) scale(0.96);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.al-overlay.is-open .al-modal { transform: none; opacity: 1; }

.al-accent {
	position: absolute;
	top: 0;
	left: 3rem;
	right: 3rem;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(207, 180, 0, 0.35), transparent);
}

.al-head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.75rem;
	border-bottom: 1px solid rgba(101, 93, 198, 0.1);
	background: linear-gradient(160deg, #07091f, #050719);
	border-radius: 28px 28px 0 0;
}
.al-heading {
	margin: 0;
	font-family: "Exo", ui-sans-serif, system-ui, sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #fff;
}
.al-sub {
	margin: 2px 0 0;
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.8rem;
}
.al-close {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.75rem;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	background: rgba(101, 93, 198, 0.1);
	border: 1px solid rgba(101, 93, 198, 0.2);
	transition: background 0.2s, color 0.2s;
}
.al-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.al-body { padding: 1.5rem 1.75rem; }

.al-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.al-field { display: flex; flex-direction: column; min-width: 0; }
.al-field-wide { grid-column: 1 / -1; }
@media (max-width: 480px) { .al-form { grid-template-columns: 1fr; } }

.al-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.35);
}
.al-req { color: #cfb400; }

.al-control {
	width: 100%;
	padding: 12px 16px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	font-family: inherit;
	font-size: 0.92rem;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
}
.al-control::placeholder { color: rgba(255, 255, 255, 0.3); }
.al-control:focus {
	outline: none;
	border-color: rgba(101, 93, 198, 0.5);
	background: rgba(101, 93, 198, 0.06);
	box-shadow: 0 0 0 3px rgba(101, 93, 198, 0.1);
}
textarea.al-control { resize: vertical; min-height: 3.4rem; }
select.al-control {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239490d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	padding-right: 2.4rem;
}
select.al-control option { color: #fff; background: #07091f; }

/* STCW-style single-select button group */
.al-btngroup { display: flex; gap: 0.5rem; }
.al-btn {
	flex: 1;
	padding: 0.75rem 0.4rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.4);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 400;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.al-btn:hover { border-color: rgba(101, 93, 198, 0.3); }
.al-btn.is-active {
	background: rgba(101, 93, 198, 0.18);
	border-color: rgba(101, 93, 198, 0.45);
	color: #9490d8;
	font-weight: 600;
}

.al-file {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 12px 16px;
	border-radius: 14px;
	border: 1px dashed rgba(101, 93, 198, 0.4);
	background: rgba(101, 93, 198, 0.06);
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.9rem;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.al-file:hover { border-color: rgba(101, 93, 198, 0.7); background: rgba(101, 93, 198, 0.1); }
.al-file.has-file { color: #fff; border-style: solid; border-color: rgba(101, 93, 198, 0.5); }
.al-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.al-file-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.al-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.al-error { margin-top: 4px; font-size: 0.72rem; color: #ff8a8a; }
.al-field.has-error .al-control,
.al-field.has-error .al-file { border-color: rgba(255, 138, 138, 0.6); }

.al-actions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.al-feedback { margin: 0; font-size: 0.85rem; line-height: 1.5; }
.al-feedback.is-error { color: #ff8a8a; }

.al-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 1rem 1.5rem;
	border: none;
	border-radius: 1rem;
	cursor: pointer;
	font-family: inherit;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: #fff;
	background: #655dc6;
	box-shadow: 0 4px 24px rgba(101, 93, 198, 0.4);
	transition: transform 0.2s, opacity 0.2s;
}
.al-submit:hover { transform: scale(1.02); opacity: 0.92; }
.al-submit:active { transform: scale(0.98); }
.al-submit[disabled] { opacity: 0.7; cursor: default; transform: none; }

.al-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 9999px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	animation: al-spin 0.7s linear infinite;
}
.al-form.is-loading .al-spinner { display: inline-block; }
@keyframes al-spin { to { transform: rotate(360deg); } }

/* Success state (replaces the form) */
.al-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
	padding: 3rem 0;
}
.al-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border-radius: 9999px;
	color: #9490d8;
	background: rgba(101, 93, 198, 0.15);
}
.al-success h3 { margin: 0; font-family: "Exo", sans-serif; font-size: 1.2rem; font-weight: 700; color: #fff; }
.al-success p { margin: 0; max-width: 280px; color: rgba(255, 255, 255, 0.45); font-size: 0.88rem; line-height: 1.6; }
.al-success-line { width: 3rem; height: 2px; margin-top: 0.5rem; border-radius: 9999px; background: #cfb400; opacity: 0.6; }
