/*
 * Contact-form component styles.
 * Independent clean-room implementation from a written spec.
 * Two unrelated blocks live in this file: the hero/contact-page lead
 * form card (plus a legacy Contact Form 7 styling block), and a
 * service-checklist picker meant to sit above/inside that same card.
 */

.ocf-field {
	position: relative;
}

.ocf-field input,
.ocf-field textarea {
	z-index: 1;
	width: 100%;
	position: relative;
}

.ocf-field > *:not(input):not(textarea):not(select):not(label):not(.ocf-phone-combo) {
	z-index: 2;
	transform: translateY(-50%);
	top: 50%;
	right: 0.5rem;
	position: absolute !important;
	pointer-events: auto;
}

.ocf-honeypot {
	left: -9999px;
	position: absolute;
}

.ocf-name-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	display: grid;
}

.ocf-form-status {
	display: none;
}

.ocf-form-status.is-visible {
	display: block;
}

.ocf-form-success {
	padding: 2rem 0;
	text-align: center;
}

.ocf-form-success svg {
	width: 3rem;
	margin-bottom: 1rem;
	height: 3rem;
	color: var(--ocf-primary);
}

.ocf-form-success h3 {
	margin-bottom: 0.5rem;
	font-weight: var(--font-weight-bold);
	font-size: var(--font-h3-size);
	color: var(--ocf-heading);
}

.ocf-form-success p,
.ocf-form-error {
	margin-top: 0.75rem;
	font-size: var(--font-label-size);
}

.ocf-form-success p {
	margin-top: 0;
	color: var(--ocf-body);
}

.ocf-form-error {
	color: #dc2626;
}

.ocf-form-shell {
	max-width: 42rem;
}

/* Legacy Contact Form 7 styling — no current markup renders a wpcf7 form. */

.wpcf7 .form-grid {
	grid-template-columns: 1fr;
	gap: 1.5rem;
	display: grid;
}

.wpcf7 .form-field-full {
	grid-column: 1 / -1;
}

.wpcf7 label {
	text-transform: uppercase;
	margin-bottom: 0.5rem;
	letter-spacing: 0.15em;
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-label-size);
	display: block;
	color: var(--ocf-body);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	transition: border-color var(--duration) ease, box-shadow var(--duration) ease;
	padding: 0.875rem 1rem;
	outline: none;
	font-size: var(--font-body-size);
	font-family: var(--ocf-font-body), system-ui, sans-serif;
	display: block;
	color: var(--ocf-heading);
	border-radius: var(--radius);
	border: 1px solid color-mix(in srgb, var(--ocf-border-light) 12%, transparent);
	background-color: var(--ocf-bg);
	appearance: none;
	-webkit-appearance: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ocf-primary-hover) 8%, transparent);
	border-color: var(--ocf-primary-hover);
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
	font-weight: var(--font-weight-light);
	color: var(--ocf-body);
}

.wpcf7 select {
	padding-right: 2.5rem;
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%235b8ab6' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
}

.wpcf7 textarea {
	resize: vertical;
	min-height: 160px;
}

.wpcf7 input[type="submit"] {
	transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
	text-transform: var(--button-text-transform);
	padding: 0.75rem 1rem;
	min-height: 2.75rem;
	margin-top: 0.5rem;
	line-height: 1.2;
	letter-spacing: var(--button-letter-spacing);
	justify-content: center;
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-body-size);
	font-family: var(--ocf-font-body), system-ui, sans-serif;
	display: inline-flex;
	cursor: pointer;
	color: var(--ocf-heading-alt);
	box-shadow: var(--button-shadow);
	border-radius: var(--button-radius);
	border: var(--button-border-width) solid var(--button-border-color);
	border-color: transparent;
	background-color: var(--ocf-primary);
	appearance: none;
	align-items: center;
	-webkit-appearance: none;
}

.wpcf7 input[type="submit"]:hover {
	transform: var(--button-transform-hover);
	box-shadow: var(--button-shadow-hover);
	background-color: var(--ocf-primary-hover);
}

.wpcf7 .wpcf7-spinner {
	margin-left: 1rem;
}

.wpcf7 .wpcf7-not-valid {
	border-color: #dc2626 !important;
}

.wpcf7 .wpcf7-not-valid-tip {
	margin-top: 0.375rem;
	font-weight: var(--font-weight-medium);
	font-size: var(--font-label-size);
	color: #dc2626;
}

.wpcf7 .wpcf7-response-output {
	padding: 1rem 1.25rem;
	margin: 1.5rem 0 0;
	line-height: 1.5;
	font-size: var(--font-label-size);
	border-radius: var(--radius);
	border: 1px solid;
}

.wpcf7 form.sent .wpcf7-response-output {
	color: #065f46;
	border-color: #059669;
	background-color: #ecfdf5;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
	color: #991b1b;
	border-color: #dc2626;
	background-color: #fef2f2;
}

.wpcf7 form.failed .wpcf7-response-output {
	color: #92400e;
	border-color: #d97706;
	background-color: #fffbeb;
}

.wpcf7 p {
	margin: 0;
}

/* Hero form card — live on home and contact page. */

.hero-form-card {
	padding: 1.75rem;
	box-shadow: var(--card-shadow);
	border-radius: var(--card-radius);
	border: var(--card-border-width) solid var(--card-border-color-subtle);
	background: var(--ocf-bg);
}

.hero-form-card .hero-form-title {
	margin-bottom: 0.875rem;
	letter-spacing: -0.01em;
	font-weight: var(--font-weight-bold);
	font-size: var(--font-h3-size);
	font-family: var(--ocf-font-heading), Georgia, serif;
	color: var(--ocf-heading);
}

.hero-form-card > p {
	opacity: 0.7;
	margin-bottom: 1.25rem;
	font-size: var(--font-label-size);
	color: var(--ocf-body);
}

.hero-form-card .hero-form-fields {
	gap: 0.875rem;
	flex-direction: column;
	display: flex;
}

.hero-form-card input,
.hero-form-card textarea,
.hero-form-card select {
	width: 100%;
	transition: border-color var(--duration) ease, box-shadow var(--duration) ease;
	padding: 0.75rem 1rem;
	outline: none;
	font-size: var(--font-body-size);
	font-family: var(--ocf-font-body), system-ui, sans-serif;
	display: block;
	color: var(--ocf-heading);
	border-radius: var(--radius);
	border: 2px solid var(--ocf-border-light);
	background: var(--ocf-bg);
}

.hero-form-card input:focus,
.hero-form-card textarea:focus,
.hero-form-card select:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ocf-primary) 10%, transparent);
	border-color: var(--ocf-primary);
}

.hero-form-card input::placeholder,
.hero-form-card textarea::placeholder {
	color: var(--ocf-body);
}

.hero-form-card textarea {
	resize: vertical;
	min-height: 80px;
}

.hero-form-card .ocf-custom-checkbox {
	line-height: 1.4;
	gap: 0.65rem;
	font-size: var(--font-label-size);
	display: flex;
	cursor: pointer;
	color: var(--ocf-heading);
	align-items: flex-start;
}

.hero-form-card .ocf-custom-checkbox input[type="checkbox"] {
	width: 1.1rem;
	padding: 0;
	margin: 0.1rem 0 0;
	height: 1.1rem;
	flex: 0 0 auto;
	accent-color: var(--ocf-primary);
}

.ocf-phone-combo {
	width: 100%;
	grid-template-columns: clamp(6.75rem, 21%, 7.25rem) minmax(0, 1fr);
	gap: 0.5rem;
	display: grid;
}

.ocf-phone-combo .ocf-phone-country {
	width: 100%;
	white-space: nowrap;
	transition: border-color var(--duration) ease, box-shadow var(--duration) ease;
	padding-inline: 0.45rem 1.15rem;
	padding-block: 0.75rem;
	outline: none;
	min-width: 0;
	font-size: var(--font-body-size);
	font-family: var(--ocf-font-body), system-ui, sans-serif;
	display: block;
	color: var(--ocf-heading);
	border-radius: var(--radius);
	border: 1px solid var(--ocf-border-light);
	background: var(--ocf-bg);
	background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
	background-repeat: no-repeat;
	background-position: calc(100% - 0.78rem) 50%, calc(100% - 0.48rem) 50%;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	appearance: none;
}

.ocf-phone-combo .ocf-phone-country:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ocf-primary) 10%, transparent);
	border-color: var(--ocf-primary);
}

.ocf-phone-combo input {
	min-width: 0;
}

.hero-form-card .form-submit-btn {
	width: 100%;
	transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
	text-transform: var(--button-text-transform);
	padding: 0.75rem 1rem;
	min-height: 2.75rem;
	line-height: 1.2;
	letter-spacing: var(--button-letter-spacing);
	justify-content: center;
	gap: 0.5rem;
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-body-size);
	font-family: var(--ocf-font-body), system-ui, sans-serif;
	display: inline-flex;
	cursor: pointer;
	color: var(--ocf-heading-alt);
	box-shadow: var(--button-shadow);
	border-radius: var(--button-radius);
	border: var(--button-border-width) solid transparent;
	background: var(--ocf-primary);
	align-items: center;
}

.hero-form-card .form-submit-btn:hover {
	transform: var(--button-transform-hover);
	box-shadow: var(--button-shadow-hover);
	background: var(--ocf-primary-hover);
}

.hero-form-card .form-submit-btn:disabled {
	transform: none;
	opacity: 0.45;
	cursor: not-allowed;
}

.ocf-form-secure-note {
	white-space: nowrap;
	text-align: center;
	margin: -0.1rem 0 0;
	line-height: 1.4;
	justify-content: center;
	gap: 0.45rem;
	font-size: 14px;
	display: inline-flex;
	color: color-mix(in srgb, var(--ocf-body) 72%, var(--ocf-bg));
	align-items: center;
}

.ocf-form-secure-note svg {
	color: color-mix(in srgb, var(--ocf-body) 70%, var(--ocf-bg));
	flex: 0 0 auto;
	height: 0.9rem;
	width: 0.9rem;
}

/* Hero service on-ramp — no current markup emitter anywhere in the theme. */

.hero-svc-list {
	scrollbar-width: thin;
	scrollbar-color: var(--ocf-border-light) transparent;
	overflow-y: auto;
	max-height: 320px;
	margin-bottom: 1rem;
	gap: 0.25rem;
	flex-direction: column;
	display: flex;
}

.hero-svc-row {
	width: 100%;
	transition: all 0.15s ease;
	text-align: left;
	padding: 0.625rem 0.875rem;
	gap: 0.75rem;
	font-family: inherit;
	display: flex;
	cursor: pointer;
	border-radius: var(--radius-sm);
	border: 1.5px solid var(--ocf-border-light);
	background: var(--ocf-bg);
	align-items: center;
}

.hero-svc-row:hover {
	border-color: var(--ocf-border);
}

.hero-svc-row.is-selected {
	background: color-mix(in srgb, var(--ocf-primary) 4%, var(--ocf-bg));
	border-color: var(--ocf-primary);
}

.hero-svc-check {
	width: 1.25rem;
	transition: all 0.15s ease;
	justify-content: center;
	height: 1.25rem;
	flex-shrink: 0;
	display: flex;
	color: transparent;
	border-radius: var(--radius-sm);
	border: 1.5px solid var(--ocf-border);
	align-items: center;
}

.hero-svc-row.is-selected .hero-svc-check {
	color: #fff;
	border-color: var(--ocf-primary);
	background: var(--ocf-primary);
}

.hero-svc-check svg {
	height: 0.75rem;
	width: 0.75rem;
}

.hero-svc-label {
	font-weight: var(--font-weight-medium);
	font-size: var(--font-label-size);
	color: var(--ocf-heading);
}

.hero-svc-other-wrap {
	margin: -0.25rem 0 1rem;
}

.hero-svc-other-wrap[hidden] {
	display: none;
}

.hero-svc-other-wrap input {
	border-width: 1.5px;
	background: var(--ocf-bg);
}

@media (min-width: 640px) {
	.wpcf7 .form-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 640px) {
	.hero-form-card {
		padding: 2rem;
	}
}

@media (max-width: 639px) {
	.ocf-name-grid,
	.ocf-phone-combo {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.ocf-form-secure-note {
		white-space: normal;
	}
}
