/* The licence notice that takes a Dowebo section's place (inc/lock.php) and the contact form (inc/contact-block.php),
   in the theme's own colours (theme.json presets) when it has them. */

.dwb-licence-notice {
	box-sizing: border-box;
	max-width: var(--wp--style--global--content-size, 720px);
	margin: var(--wp--preset--spacing--40, 2rem) auto;
	padding: 1.25rem 1.5rem;
	border: 1px dashed color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 12px;
	background: var(--wp--preset--color--accent-5, #f5f7fb);
	color: var(--wp--preset--color--contrast, #0e1525);
	text-align: center;
}

.dwb-licence-notice p {
	margin: 0;
}

.dwb-licence-notice__text {
	font-size: 0.95em;
	line-height: 1.5;
}

.dwb-licence-notice__action {
	margin-top: 0.875rem !important;
}

.dwb-licence-notice__button {
	display: inline-block;
	text-decoration: none;
}

/* Contact form. Back from sending, the page opens on it (#dwb-contact-<n>), clear of a sticky header. */
.dwb-contact-form {
	scroll-margin-top: 7rem;
}

.dwb-contact-form__form {
	display: grid;
	gap: 1rem;
}

.dwb-contact-form .dwb-field {
	display: grid;
	gap: 0.375rem;
	margin: 0;
}

.dwb-contact-form label {
	font-weight: 600;
}

.dwb-contact-form label small {
	font-weight: 400;
	opacity: 0.75;
}

.dwb-contact-form input,
.dwb-contact-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.875rem;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: var(--sb-radius, 8px);
	background: var(--wp--preset--color--base, #fff);
	color: inherit;
	font: inherit;
}

.dwb-contact-form input:focus,
.dwb-contact-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent-3, currentColor);
	outline-offset: 1px;
}

.dwb-contact-form textarea {
	min-height: 8rem;
	resize: vertical;
}

.dwb-contact-form .dwb-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dwb-contact-form__privacy {
	margin: 0;
	font-size: 0.875em;
	opacity: 0.8;
}

.dwb-contact-form__status {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: #e7f6ec;
	color: #0b5a26;
}

.dwb-contact-form__status.is-error {
	background: #fcecec;
	color: #8a1f1f;
}

/* In the editor the form is a preview: it never sends. */
.editor-styles-wrapper .dwb-contact-form__form,
.block-editor-block-list__layout .dwb-contact-form__form {
	pointer-events: none;
}
