/**
 * Data Protection Complaint Manager — front-end form styles.
 *
 * Loaded only on pages where the complaint form is shown. Intentionally light
 * and theme-friendly: styles are scoped to the plugin's own wrappers/classes so
 * they don't affect the surrounding theme, and themes can override them.
 */

.dpcm-form-wrap {
	max-width: 640px;
	margin: 1.5em 0;
}

/* Apply predictable box sizing only to the plugin's own controls. */
.dpcm-form-wrap input,
.dpcm-form-wrap select,
.dpcm-form-wrap textarea {
	box-sizing: border-box;
}

/* Intro text above the form. */
.dpcm-form-intro {
	margin-bottom: 1.25em;
}

/* Notices (success / error). */
.dpcm-notice {
	margin: 0 0 1.25em;
	padding: 0.85em 1em;
	border: 1px solid transparent;
	border-radius: 4px;
}

.dpcm-notice p {
	margin: 0 0 0.5em;
}

.dpcm-notice p:last-child {
	margin-bottom: 0;
}

.dpcm-success {
	background: #e7f6ec;
	border-color: #b6e0c4;
	color: #1b5e34;
}

.dpcm-errors {
	background: #fdecea;
	border-color: #f5c2c0;
	color: #8a1f17;
}

/* Fields. */
.dpcm-field {
	margin: 0 0 1.25em;
}

.dpcm-field > label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.dpcm-form-wrap input[type="text"],
.dpcm-form-wrap input[type="email"],
.dpcm-form-wrap input[type="tel"],
.dpcm-form-wrap select,
.dpcm-form-wrap textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.55em 0.65em;
	font-size: 1rem;
	line-height: 1.4;
	border: 1px solid #8a8a8a;
	border-radius: 4px;
	background: #fff;
	color: inherit;
}

.dpcm-form-wrap textarea {
	min-height: 8em;
	resize: vertical;
}

.dpcm-form-wrap input:focus,
.dpcm-form-wrap select:focus,
.dpcm-form-wrap textarea:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
	border-color: #2271b1;
}

/* "(required)" marker and helper text. */
.dpcm-required {
	font-weight: 400;
	color: #8a1f17;
}

.dpcm-help {
	display: block;
	margin-top: 0.35em;
	font-size: 0.875em;
	color: #595959;
}

/* Acting-for fieldset and confirmation checkbox. */
.dpcm-fieldset {
	margin: 0 0 1.25em;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 0.75em 1em;
}

.dpcm-fieldset legend {
	font-weight: 600;
	padding: 0 0.35em;
}

/* Confirmation checkbox (input wrapped inside its label). */
.dpcm-confirm label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-weight: 400;
}

.dpcm-confirm input[type="checkbox"] {
	margin-top: 0.2em;
	width: auto;
}

/* "Acting on behalf" toggle and the conditionally-shown "person represented"
   field. Showing/hiding is handled here in pure CSS (so it works even without
   JavaScript and never flashes on load); JavaScript additionally toggles the
   field's "required" state for client-side validation. */
.dpcm-acting-group .dpcm-acting-toggle {
	width: auto;
	margin-right: 0.45em;
}

.dpcm-acting-label {
	font-weight: 400;
}

.dpcm-subject-field {
	display: none;
	margin-top: 1em;
}

.dpcm-acting-toggle:checked ~ .dpcm-subject-field {
	display: block;
}

/* reCAPTCHA widget spacing. */
.dpcm-recaptcha {
	margin: 0 0 1.25em;
}

/* Submit. */
.dpcm-submit {
	margin: 0;
}

.dpcm-submit button {
	display: inline-block;
	padding: 0.7em 1.4em;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
	background: #2271b1;
	border: 1px solid #2271b1;
	border-radius: 4px;
}

.dpcm-submit button:hover,
.dpcm-submit button:focus {
	background: #135e96;
	border-color: #135e96;
}

/* "Make a complaint" link/button rendered by the procedure shortcode. */
.dpcm-form-link {
	display: inline-block;
	margin-top: 0.5em;
}

/* Keep the honeypot field hidden even if the theme resets inline styles. */
.dpcm-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
