/*
 * Quanfluence Datasheets — lead form dialog.
 * Rebrand from the theme: .qfd-modal { --qfd-accent: #0a7c55; }
 */

.qfd-modal {
	--qfd-accent: #13309a;
	--qfd-text: #1f2430;
	--qfd-muted: #6b7280;
	--qfd-border: #d7dce6;
	--qfd-surface: #f1f4f9;
	--qfd-error: #b42318;
	--qfd-success: #1b7f3b;
	width: min(480px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-left: 4px solid var(--qfd-accent);
	border-radius: 4px;
	background: #fff;
	color: var(--qfd-text);
	box-shadow: 0 24px 60px rgba(15, 25, 60, .25);
}

.qfd-modal::backdrop {
	background: rgba(10, 18, 40, .55);
}

.qfd-modal[open] {
	animation: qfd-in .2s ease-out;
}

@keyframes qfd-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.qfd-form {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 32px 32px 28px;
}

.qfd-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--qfd-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.qfd-close:hover,
.qfd-close:focus-visible {
	color: var(--qfd-accent);
}

.qfd-eyebrow {
	margin: 0;
	color: var(--qfd-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.qfd-title {
	margin: -6px 0 0;
	color: var(--qfd-text);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.qfd-title:empty {
	display: none;
}

.qfd-intro {
	margin: 0 0 4px;
	color: var(--qfd-muted);
	font-size: 15px;
	line-height: 1.5;
}

.qfd-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 14px;
	font-weight: 500;
}

.qfd-field em {
	color: var(--qfd-error);
	font-style: normal;
}

.qfd-field input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--qfd-border);
	border-radius: 2px;
	background: var(--qfd-surface);
	color: var(--qfd-text);
	font: inherit;
	font-weight: 400;
}

.qfd-field input:focus {
	outline: none;
	border-color: var(--qfd-accent);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(19, 48, 154, .15);
}

.qfd-message {
	margin: 0;
	font-size: 14px;
}

.qfd-message:empty {
	display: none;
}

.qfd-message.is-error { color: var(--qfd-error); }
.qfd-message.is-success { color: var(--qfd-success); }

.qfd-submit,
.qfd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 30px;
	border: 0;
	border-radius: 2px;
	background: var(--qfd-accent, #13309a);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .12em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s;
}

.qfd-submit:hover,
.qfd-button:hover {
	background: #0c2276;
	color: #fff;
}

.qfd-submit:disabled {
	opacity: .7;
	cursor: wait;
}

.qfd-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.qfd-form { padding: 28px 20px 22px; }
	.qfd-title { font-size: 21px; }
}
