/* ==========================================================================
   CONTACT PAGE (.pi-contact*)
   Styles com_contact's contact view, overridden in
   html/com_contact/contact/default.php and default_form.php to show just
   the page heading and the "send us a message" form - no address/misc-info/
   links/articles/profile sections. Loaded only on that view (see the
   registerAndUseStyle() call in default.php).
   ========================================================================== */

.pi-contact {
	max-width: 640px;
	margin-inline: auto;
}

.pi-contact-form fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

.pi-contact-form legend {
	width: 100%;
	margin: 0 0 var(--pi-space-4);
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--pi-color-primary);
}

/* Core's own "* Required field" note (a spacer-type form field, not
   something this override renders itself). */
.pi-contact-form .spacer {
	display: block;
	margin-bottom: var(--pi-space-4);
	color: var(--pi-color-muted);
	font-size: .875rem;
}

.pi-contact-form .control-group {
	margin-bottom: var(--pi-space-4);
}

.pi-contact-form .control-label label {
	display: block;
	margin-bottom: var(--pi-space-1);
	font-weight: 600;
	color: var(--pi-color-text);
}

.pi-contact-form .form-control {
	display: block;
	width: 100%;
	padding: var(--pi-space-2) var(--pi-space-3);
	border: 1px solid var(--pi-color-border);
	border-radius: var(--pi-radius-sm);
	font-family: var(--pi-font-family);
	font-size: 1rem;
	color: var(--pi-color-text);
	/* 50% transparent so the page's own background shows through slightly,
	   instead of a flat opaque panel. */
	background: color-mix(in srgb, var(--pi-color-background) 50%, transparent);
	transition: border-color var(--pi-transition-fast);
}

.pi-contact-form .form-control:focus {
	outline: none;
	border-color: var(--pi-color-link);
}

.pi-contact-form textarea.form-control {
	resize: vertical;
	min-height: 160px;
}

/* The "email me a copy" checkbox is the one field that reads better beside
   its label than below it. */
.pi-contact-form .control-group:has(.form-check) {
	display: flex;
	align-items: center;
	gap: var(--pi-space-2);
}

.pi-contact-form .control-group:has(.form-check) .control-label {
	margin: 0;
}

.pi-contact-form .control-group:has(.form-check) .control-label label {
	margin: 0;
	font-weight: 400;
}

.pi-contact-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pi-space-3);
	margin-top: var(--pi-space-5);
}
