/*
 * DIU Contact Form styles.
 * Cream card + dark green accent, matching the site's existing "Send Us a
 * Message" contact form. Desktop-first breakpoints (max-width) to match
 * the child theme's own stylesheets (diu-people-style.css,
 * diu-insights-report.css).
 *
 * A handful of properties on .diu-cf-submit-btn and inputs carry
 * !important. This form is embedded inside Elementor pages whose global
 * Kit button/field styles apply broad, high-specificity selectors
 * (e.g. buttons picking up the theme's outline-button skin) that were
 * silently overriding this stylesheet's background/border/color. Since
 * this is a self-contained embeddable widget that must look the same
 * wherever it's dropped, !important here is intentional, not accidental.
 */

.diu-cf-wrapper {
	--diu-cf-accent: #17392b;
	--diu-cf-accent-hover: #1f4c39;
	--diu-cf-card-bg: #ffffff;
	--diu-cf-text: #1a1a1a;
	--diu-cf-muted: #6b6b6b;
	--diu-cf-border: #d9d2c2;

	/* Left gap from whatever sits to our left (e.g. a column divider line);
	   width uses calc() so this offset never pushes the card past its
	   parent's edge. Reset to 0 on narrow screens, where columns typically
	   stack and there's no divider to keep clear of.
	   No max-width cap: the card fills 100% of whatever its parent column
	   provides. If it still doesn't look wider, our CSS isn't the limiting
	   factor anymore — the column's own width on the Contact Us page is. */
	width: calc(100% - 40px);
	margin: 0 0 0 40px;
	box-sizing: border-box;

	/* Matches the site's global Elementor Kit typography (confirmed in
	   wp-content/uploads/elementor/css/post-7.css:
	   --e-global-typography-*-font-family: "Overpass Mono"), rather than a
	   generic system font, so the form reads as part of the same page as
	   the "Get In Touch" text next to it. Falls back to the same
	   system-monospace stack if the webfont hasn't loaded yet. */
	font-family: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.diu-cf-wrapper * {
	box-sizing: border-box;
}

.diu-cf-card {
	width: 100%;
	background: var(--diu-cf-card-bg);
	border: 1px solid #dedad0;
	border-radius: 12px;
	padding: 44px;
}

.diu-cf-heading {
	margin: 0 0 28px;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--diu-cf-text);
}

.diu-cf-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
}

.diu-cf-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	width: 100%;
}

.diu-cf-field label,
.diu-cf-group-label {
	font-weight: 600;
	font-size: 14px;
	color: var(--diu-cf-text);
}

.diu-cf-required {
	color: #d63638;
}

.diu-cf-form input[type="text"],
.diu-cf-form input[type="email"],
.diu-cf-form textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 16px;
	font-size: 16px;
	line-height: 1.4;
	font-family: inherit;
	color: var(--diu-cf-text);
	background: #fff !important;
	border: 1px solid var(--diu-cf-border) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.diu-cf-form textarea {
	min-height: 130px;
	resize: vertical;
}

.diu-cf-form input::placeholder,
.diu-cf-form textarea::placeholder {
	color: #a8a196;
}

.diu-cf-form input[type="text"]:focus,
.diu-cf-form input[type="email"]:focus,
.diu-cf-form textarea:focus {
	outline: none !important;
	border-color: var(--diu-cf-accent) !important;
	box-shadow: 0 0 0 3px rgba(23, 57, 43, 0.12) !important;
}

/* Name row: First Name / Last Name side by side, each with its own label above. */
.diu-cf-name-row {
	display: flex;
	gap: 16px;
}

.diu-cf-name-col {
	flex: 1 1 0;
}

/* Honeypot: kept in the DOM and focusable by bots, but invisible/unreachable to real visitors. */
.diu-cf-hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.diu-cf-submit-field {
	margin-top: 6px;
}

.diu-cf-form button.diu-cf-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	padding: 12px 28px;
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	line-height: 1;
	background: var(--diu-cf-accent) !important;
	background-image: none !important;
	color: #fff !important;
	border: 1px solid var(--diu-cf-accent) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.diu-cf-form button.diu-cf-submit-btn:hover,
.diu-cf-form button.diu-cf-submit-btn:focus {
	background: var(--diu-cf-accent-hover) !important;
	border-color: var(--diu-cf-accent-hover) !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(23, 57, 43, 0.25) !important;
}

.diu-cf-form button.diu-cf-submit-btn:active {
	transform: translateY(0);
	box-shadow: none !important;
}

.diu-cf-form button.diu-cf-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.diu-cf-notice {
	padding: 12px 16px;
	border-radius: 6px;
	border-left: 3px solid transparent;
	margin-bottom: 22px;
	font-size: 15px;
	transition: opacity 0.4s ease;
}

.diu-cf-notice-success {
	background: #edfaef;
	border-left-color: #2e8540;
	color: #1e5f2c;
}

.diu-cf-notice-error {
	background: #fbeaea;
	border-left-color: #d63638;
	color: #7a1a1c;
}

/* Wider viewports: allow the submit button to size to content instead of full width. */
@media only screen and (min-width: 500px) {
	.diu-cf-form button.diu-cf-submit-btn {
		width: auto;
		min-width: 170px;
	}
}

/* Tablets and below: columns typically stack here, so drop the divider-gap
   margin and let the card use the full available width. */
@media only screen and (max-width: 991px) {
	.diu-cf-wrapper {
		width: 100%;
		margin-left: 0;
	}
}

/* Tablets and below: reduce card padding. */
@media only screen and (max-width: 782px) {
	.diu-cf-card {
		padding: 30px 26px;
	}
}

/* Small phones: stack the Name row and tighten spacing. */
@media only screen and (max-width: 480px) {
	.diu-cf-card {
		padding: 24px 18px;
		border-radius: 10px;
	}

	.diu-cf-heading {
		font-size: 22px;
		margin-bottom: 22px;
	}

	.diu-cf-form {
		gap: 18px;
	}

	.diu-cf-name-row {
		flex-direction: column;
		gap: 14px;
	}

	.diu-cf-form input[type="text"],
	.diu-cf-form input[type="email"],
	.diu-cf-form textarea {
		font-size: 15px;
	}
}
