/* CCN native lead forms — theme-token-driven, so light/dark are automatic.
   Used inline (homepage Contact) and inside the coverage modal. */

.ccn-form-wrap {
	--ccn-form-btn: #005ae0;
	--ccn-form-btn-hover: #004f9d;
	max-width: 560px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 32px);
	background: var(--wp--preset--color--raised, #fff);
	border: 1px solid var(--wp--preset--color--border, #e8e8eb);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(20, 27, 56, 0.08);
	color: var(--wp--preset--color--text, #141b38);
}

/* Inside the coverage modal the dialog is the surface, so the wrap is plain. */
.ccn-modal .ccn-form-wrap {
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* Honeypot: hidden from humans, present for bots. */
.ccn-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ccn-form-field {
	margin: 0 0 18px;
}

.ccn-form-field label {
	display: block;
	margin: 0 0 7px;
	font-weight: 600;
	font-size: 0.92rem;
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--text, #141b38);
}

.ccn-req {
	color: var(--wp--preset--color--primary, #005ae0);
}

.ccn-form input[type="text"],
.ccn-form input[type="email"],
.ccn-form input[type="tel"],
.ccn-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	font: inherit;
	line-height: 1.4;
	color: var(--wp--preset--color--text, #141b38);
	background: var(--wp--preset--color--surface, #f3f4f5);
	border: 1px solid var(--wp--preset--color--border, #e8e8eb);
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ccn-form input::placeholder,
.ccn-form textarea::placeholder {
	color: var(--wp--preset--color--muted, #8c8f9a);
	opacity: 1;
}

.ccn-form input:hover,
.ccn-form textarea:hover {
	border-color: var(--wp--preset--color--muted, #8c8f9a);
}

.ccn-form input:focus,
.ccn-form textarea:focus {
	outline: none;
	background: var(--wp--preset--color--base, #fff);
	border-color: var(--wp--preset--color--primary, #005ae0);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary, #005ae0) 22%, transparent);
}

.ccn-form textarea {
	resize: vertical;
	min-height: 120px;
}

/* Submit — a real, solid, high-contrast button. Its colors are set explicitly
   (not the theme's link-blue, which is intentionally light in dark mode) so the
   white label stays readable on both themes. */
.ccn-form-submit {
	margin: 22px 0 0;
}

.ccn-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	padding: 13px 22px;
	font: inherit;
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.2;
	color: #fff;
	background: var(--ccn-form-btn, #005ae0);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.ccn-form__submit:hover {
	background: var(--ccn-form-btn-hover, #004f9d);
}

.ccn-form__submit:active {
	transform: translateY(1px);
}

.ccn-form__submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ccn-form-btn, #005ae0) 40%, transparent);
}

/* Dark mode: stronger blue so the white button label keeps AA contrast. */
:root[data-theme="dark"] .ccn-form-wrap {
	--ccn-form-btn: #2563eb;
	--ccn-form-btn-hover: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ccn-form-wrap {
		--ccn-form-btn: #2563eb;
		--ccn-form-btn-hover: #1d4ed8;
	}
}

/* Notices */
.ccn-form-notice {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: 10px;
	font-size: 0.95rem;
	border: 1px solid transparent;
}

.ccn-form-notice--success {
	color: #00532e;
	background: rgba(0, 132, 74, 0.12);
	border-color: rgba(0, 132, 74, 0.35);
}

.ccn-form-notice--error {
	color: #7a1f1f;
	background: rgba(179, 45, 46, 0.10);
	border-color: rgba(179, 45, 46, 0.35);
}

:root[data-theme="dark"] .ccn-form-notice--success {
	color: #7ee2b0;
}

:root[data-theme="dark"] .ccn-form-notice--error {
	color: #f2a6a6;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ccn-form-notice--success {
		color: #7ee2b0;
	}
	:root:not([data-theme="light"]) .ccn-form-notice--error {
		color: #f2a6a6;
	}
}
