/* Spanish Link Document Submissions — form styles.
 * Uses the theme's colour variables when available, with fallbacks. */
.sls-ds {
	--ds-navy: var(--wp--preset--color--navy, #0E2A5C);
	--ds-blue: var(--wp--preset--color--blue, #1B5FC9);
	--ds-ink: var(--wp--preset--color--ink, #13213F);
	--ds-muted: var(--wp--preset--color--muted, #4B5875);
	--ds-line: #D4DEEE;
	--ds-soft: #F9FBFE;
	--ds-orange-text: var(--wp--preset--color--orange-dark, #B4560A);
	--ds-error: #B3261E;
	font-family: inherit;
	color: var(--ds-ink);
	text-align: left;
}
.sls-ds *, .sls-ds *::before, .sls-ds *::after { box-sizing: border-box; }
.sls-ds [hidden] { display: none !important; }

.sls-ds-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}
.sls-ds-card,
.sls-ds--contact .sls-ds-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.sls-ds-card {
	padding: clamp(22px, 4vw, 40px);
	border-radius: 28px;
	background: #fff;
	border: 1px solid #E3E9F2;
	box-shadow: 0 20px 50px rgba(14, 42, 92, .08);
}
.sls-ds-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

/* Fields */
.sls-ds-field { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.sls-ds-field > label,
.sls-ds-fieldset legend,
.sls-ds-label {
	font-size: .875rem;
	font-weight: 600;
	color: var(--ds-navy);
	padding: 0;
}
.sls-ds-req { color: var(--ds-orange-text); }
.sls-ds-opt { font-weight: 400; color: #5B6783; }
.sls-ds input[type="text"],
.sls-ds input[type="email"],
.sls-ds input[type="tel"],
.sls-ds input[type="date"],
.sls-ds select,
.sls-ds textarea {
	width: 100%;
	min-height: 50px;
	padding: 0 16px;
	border-radius: 14px;
	border: 1.5px solid var(--ds-line);
	background: var(--ds-soft);
	font: inherit;
	font-size: 1rem;
	color: var(--ds-ink);
	transition: border-color .15s, box-shadow .15s, background-color .15s;
	margin: 0;
}
.sls-ds select { padding-right: 40px; appearance: none; 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='%230E2A5C' stroke-width='2.4' 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 14px center; }
.sls-ds textarea { padding: 14px 16px; line-height: 1.5; resize: vertical; min-height: 120px; }
.sls-ds input:focus, .sls-ds select:focus, .sls-ds textarea:focus {
	outline: none;
	border-color: var(--ds-blue);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(27, 95, 201, .18);
}
.sls-ds-field.is-invalid input,
.sls-ds-field.is-invalid select,
.sls-ds-field.is-invalid textarea { border-color: var(--ds-error); background: #FFF8F7; }
.sls-ds-error {
	margin: 0;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--ds-error);
}
.sls-ds-hint { margin: 0; font-size: .8125rem; color: #5B6783; }

/* Direction choice cards */
.sls-ds-fieldset { border: 0; padding: 0; margin: 0; }
.sls-ds-fieldset legend { margin-bottom: 10px; }
.sls-ds-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sls-ds-choice { position: relative; display: block; cursor: pointer; margin: 0; }
.sls-ds-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sls-ds-choice span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 8px 12px;
	border-radius: 14px;
	border: 1.5px solid var(--ds-line);
	background: var(--ds-soft);
	font-weight: 600;
	font-size: .9375rem;
	text-align: center;
	transition: all .15s;
}
.sls-ds-choice:hover span { border-color: #9DB5DE; }
.sls-ds-choice input:checked + span { border: 2px solid var(--ds-blue); background: #E8F0FC; color: var(--ds-navy); }
.sls-ds-choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(27, 95, 201, .25); }
.sls-ds-fieldset.is-invalid .sls-ds-choice span { border-color: var(--ds-error); }

/* Upload */
.sls-ds-upload { gap: 12px; }
.sls-ds-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 30px 20px;
	border-radius: 20px;
	border: 2px dashed #B9CBE8;
	background: #F4F8FE;
	transition: background-color .15s, border-color .15s;
}
.sls-ds-drop.is-dragover { background: #E8F0FC; border-color: var(--ds-blue); }
.sls-ds-drop:focus-within { border-color: var(--ds-blue); box-shadow: 0 0 0 4px rgba(27, 95, 201, .18); }
.sls-ds-drop__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 18px;
	background: #fff;
	color: var(--ds-blue);
	box-shadow: 0 6px 16px rgba(14, 42, 92, .08);
}
.sls-ds-drop__title { font-size: 1rem; color: var(--ds-navy); }
.sls-ds-drop__or { font-size: .875rem; color: var(--ds-muted); }
.sls-ds-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.sls-ds-upload.is-invalid .sls-ds-drop { border-color: var(--ds-error); }

.sls-ds-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sls-ds-files:empty { display: none; }
.sls-ds-file {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 10px 10px 14px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #E3E9F2;
	margin: 0;
}
.sls-ds-file__ext {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: #E8F0FC;
	color: var(--ds-blue);
	font-size: .6875rem;
	font-weight: 700;
}
.sls-ds-file__info { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 10px; font-size: .875rem; }
.sls-ds-file__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sls-ds-file__size { color: #5B6783; white-space: nowrap; }
.sls-ds-file__remove {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 0;
	background: #F5F8FC;
	color: var(--ds-muted);
	cursor: pointer;
}
.sls-ds-file__remove:hover { background: #FDECEA; color: var(--ds-error); }

.sls-ds-progress { position: relative; height: 28px; border-radius: 10px; background: #E3E9F2; overflow: hidden; }
.sls-ds-progress__bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #1B5FC9, #F5961F); transition: width .2s; }
.sls-ds-progress__text { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; font-size: .8125rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

.sls-ds-warning {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 18px;
	border-radius: 16px;
	background: #FFF6E8;
	border: 1px solid #F6D29E;
	color: #5A3A12;
}
.sls-ds-warning > span { flex: none; color: var(--ds-orange-text); line-height: 0; padding-top: 1px; }
.sls-ds-warning p { margin: 0; font-size: .875rem; line-height: 1.55; }

/* Consent */
.sls-ds-consent label { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; font-weight: 400; line-height: 1.55; color: var(--ds-muted); cursor: pointer; }
.sls-ds-consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ds-blue); }

/* Alerts */
.sls-ds-alert {
	padding: 14px 18px;
	border-radius: 14px;
	background: #FDECEA;
	border: 1px solid #F3B8B2;
	color: #7A1C15;
	font-weight: 600;
	font-size: .9375rem;
}
.sls-ds-alert:focus { outline: 3px solid rgba(179, 38, 30, .3); }

/* Summary */
.sls-ds-summary {
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 30px;
	border-radius: 28px;
	background: linear-gradient(165deg, #0E2A5C 0%, #163F86 100%);
	color: #fff;
	box-shadow: 0 24px 50px rgba(14, 42, 92, .22);
}
.sls-ds-summary__head { display: flex; align-items: center; gap: 12px; }
.sls-ds-summary__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #F7B45A; flex: none; }
.sls-ds-summary h3 { margin: 0; color: #fff; font-size: 1.25rem; }
.sls-ds-summary dl { margin: 0; }
.sls-ds-summary dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.sls-ds-summary dt { font-size: .875rem; color: #C9D6EE; margin: 0; }
.sls-ds-summary dd { margin: 0; font-size: .875rem; font-weight: 600; text-align: right; color: #fff; }
.sls-ds-summary__note { margin: 0; font-size: .8125rem; line-height: 1.55; color: #C9D6EE; }
.sls-ds-summary__call { display: block; text-align: center; font-size: .875rem; color: #fff !important; text-decoration: none; }
.sls-ds-summary__call:hover { text-decoration: underline; }

/* Buttons */
.sls-ds-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: 14px;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s, box-shadow .15s, opacity .15s;
}
.sls-ds-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(14, 42, 92, .18); }
.sls-ds-btn:focus-visible { outline: 3px solid rgba(27, 95, 201, .5); outline-offset: 2px; }
.sls-ds-btn:disabled { opacity: .7; cursor: progress; transform: none; }
.sls-ds-btn--orange { background: linear-gradient(135deg, #F7A531, #EE7D12); color: var(--ds-navy); min-height: 56px; }
.sls-ds-btn--blue { background: linear-gradient(135deg, #1B5FC9, #0E2A5C); color: #fff; font-weight: 600; font-size: .9375rem; }
.sls-ds-btn--outline { background: #fff; color: var(--ds-navy); box-shadow: inset 0 0 0 1.5px var(--ds-line); font-weight: 600; }
.sls-ds--contact .sls-ds-submit { align-self: flex-start; }

/* Success */
.sls-ds-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
	padding: 56px 24px;
	border-radius: 28px;
	background: #fff;
	border: 1px solid #E3E9F2;
	box-shadow: 0 20px 50px rgba(14, 42, 92, .08);
}
.sls-ds--contact .sls-ds-success { box-shadow: none; border: 0; padding: 32px 8px; }
.sls-ds-success:focus { outline: none; }
.sls-ds-success__icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 24px; background: #E6F5EC; color: #17733F; }
.sls-ds-success h3 { margin: 0; color: var(--ds-navy); font-size: 1.5rem; }
.sls-ds-success p { margin: 0; max-width: 480px; color: var(--ds-muted); }

/* Honeypot: hidden from people, visible to bots */
.sls-ds-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 960px) {
	.sls-ds-layout { grid-template-columns: minmax(0, 1fr); }
	.sls-ds-summary { position: static; }
}
@media (max-width: 600px) {
	.sls-ds-grid, .sls-ds-choices { grid-template-columns: minmax(0, 1fr); }
	.sls-ds-file__info { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
	.sls-ds * { transition: none !important; }
}
