/* Download gate — newsletter popup before downloads */

/* Never set `display` on the dialog itself: a closed <dialog> must stay display:none. */
.sitges-dl-gate {
	width: min(92vw, 480px);
	max-height: 90vh;
	padding: 0;
	border: 0;
	border-radius: 12px;
	overflow: auto;
	color: var(--sitges-dark-blue, #292857);
	background: #fff;
	box-shadow: 0 24px 64px rgba(41, 40, 87, 0.3);
}

.sitges-dl-gate::backdrop {
	background: rgba(41, 40, 87, 0.65);
}

.sitges-dl-gate__form {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 40px 32px 32px;
}

.sitges-dl-gate__title {
	margin: 0;
	padding-right: 32px;
	font-size: 1.5rem;
	line-height: 1.2;
}

.sitges-dl-gate__intro,
.sitges-dl-gate__privacy,
.sitges-dl-gate__error {
	margin: 0;
}

.sitges-dl-gate__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.sitges-dl-gate__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sitges-dl-gate__field label {
	font-weight: 600;
}

.sitges-dl-gate__field input {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--sitges-dark-blue, #292857);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.sitges-dl-gate__field input[aria-invalid='true'] {
	border-color: #b3261e;
}

/* Honeypot: off-screen for people, visible to bots */
.sitges-dl-gate__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sitges-dl-gate__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.sitges-dl-gate__consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--sitges-blue, #144c99);
}

.sitges-dl-gate__privacy {
	font-size: 0.875rem;
}

.sitges-dl-gate__privacy a {
	color: var(--sitges-blue, #144c99);
	text-decoration: underline;
}

.sitges-dl-gate__error {
	color: #b3261e;
	font-weight: 600;
}

.sitges-dl-gate__error:empty {
	display: none;
}

.sitges-dl-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

.sitges-dl-gate__submit,
.sitges-dl-gate__skip {
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sitges-dl-gate__submit {
	border: 2px solid var(--sitges-blue, #144c99);
	background: var(--sitges-blue, #144c99);
	color: #fff;
}

.sitges-dl-gate__submit:hover {
	border-color: var(--sitges-dark-blue, #292857);
	background: var(--sitges-dark-blue, #292857);
}

.sitges-dl-gate__submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.sitges-dl-gate__skip {
	border: 0;
	background: transparent;
	color: var(--sitges-blue, #144c99);
	text-decoration: underline;
}

.sitges-dl-gate :focus-visible {
	outline: 3px solid var(--sitges-blue, #144c99);
	outline-offset: 2px;
}

@media (max-width: 478px) {
	.sitges-dl-gate__form {
		padding: 40px 20px 24px;
	}
}
