/* =====================================================================
   WEBSTEPPER CONTACT FORM — self-contained styles for [wsstep_contact_form]
   Scoped under .ws-cf so the design tokens resolve on any theme/page.
   ===================================================================== */

.ws-cf {
	--ink:        #0A1F1A;
	--ink-soft:   #1F2937;
	--ink-mute:   #4B5563;
	--gray-500:   #6B7280;
	--gray-400:   #9CA3AF;
	--gray-300:   #D1D5DB;
	--gray-200:   #E5E7EB;
	--gray-50:    #F9FAFB;
	--green:      #10B981;
	--green-lite: #34D399;
	--green-deep: #047857;
	--green-50:   #ECFDF5;
	--red:        #DC2626;
	--red-50:     #FEF2F2;
	--amber:      #B45309;
	--paper:      #FAFAF7;

	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.ws-cf *,
.ws-cf *::before,
.ws-cf *::after { box-sizing: border-box; }

/* ---------- Section headings ---------- */
.ws-cf-section-eyebrow {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--green-deep);
	margin: 0 0 12px;
}
.ws-cf-section-h2 {
	text-align: center;
	font-size: clamp(28px, 3.6vw, 36px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0 auto 48px;
	max-width: 640px;
}
.ws-cf-section-h2 em {
	font-style: normal;
	background: linear-gradient(180deg, transparent 62%, rgba(16, 185, 129, 0.25) 62%);
	padding: 0 2px;
}

.ws-cf-grid {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 28px;
	align-items: start;
	scroll-margin-top: 80px;
}
@media (max-width: 980px) { .ws-cf-grid { grid-template-columns: 1fr; } }

/* ---------- Side panel ---------- */
.ws-cf-side {
	background: var(--ink);
	color: #FFFFFF;
	border-radius: 24px;
	padding: 40px 36px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(10,31,26,0.18);
}
.ws-cf-side::before {
	content: '';
	position: absolute;
	top: -120px; right: -120px;
	width: 320px; height: 320px;
	background: radial-gradient(circle, rgba(52,211,153,0.18) 0%, transparent 65%);
	border-radius: 50%;
	pointer-events: none;
}
.ws-cf-side-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--green-lite);
	margin-bottom: 18px;
	position: relative;
}
.ws-cf-side-eyebrow::before {
	content: '';
	width: 6px; height: 6px;
	background: var(--green-lite);
	border-radius: 50%;
}
.ws-cf-side-title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 14px;
	color: #FFFFFF;
}
.ws-cf-side-text {
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255,255,255,0.72);
	margin: 0 0 28px;
}
.ws-cf-side-text strong { color: #FFFFFF; font-weight: 600; }
.ws-cf-side-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.ws-cf-side-list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	font-size: 14px;
	color: rgba(255,255,255,0.78);
	line-height: 1.5;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ws-cf-side-list li:last-child { border-bottom: 0; }
.ws-cf-side-list li svg {
	width: 16px; height: 16px;
	color: var(--green-lite);
	flex-shrink: 0;
	margin-top: 2px;
}

/* ---------- Form card ---------- */
.ws-cf-card {
	background: #FFFFFF;
	border: 1px solid var(--gray-200);
	border-radius: 24px;
	padding: 44px;
	box-shadow: 0 12px 40px rgba(10,31,26,0.05);
}
@media (max-width: 720px) {
	.ws-cf-card { padding: 28px 22px; border-radius: 18px; }
}

.ws-cf-banner {
	display: flex;
	gap: 14px;
	padding: 18px 20px;
	border-radius: 14px;
	margin-bottom: 28px;
	font-size: 14px;
	line-height: 1.55;
	align-items: flex-start;
}
.ws-cf-banner svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.ws-cf-banner-title {
	display: block;
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 4px;
	color: var(--ink);
}
.ws-cf-banner-err {
	background: var(--red-50);
	border: 1px solid rgba(220,38,38,0.2);
	color: var(--ink-soft);
}
.ws-cf-banner-err svg { color: var(--red); }

.ws-cf-group { margin-bottom: 22px; }
.ws-cf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 600px) { .ws-cf-row { grid-template-columns: 1fr; } }

.ws-cf-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	margin-bottom: 8px;
}
.ws-cf-label-hint {
	font-size: 12px;
	font-weight: 500;
	color: var(--gray-400);
}
.ws-cf-req {
	color: var(--green-deep);
	margin-left: 4px;
}
.ws-cf-input,
.ws-cf-textarea,
.ws-cf-select {
	width: 100%;
	padding: 13px 16px;
	font-size: 15px;
	color: var(--ink);
	background: #FFFFFF;
	border: 1.5px solid var(--gray-200);
	border-radius: 10px;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}
.ws-cf-input::placeholder,
.ws-cf-textarea::placeholder { color: var(--gray-400); }
.ws-cf-input:hover,
.ws-cf-textarea:hover,
.ws-cf-select:hover { border-color: var(--gray-300); }
.ws-cf-input:focus,
.ws-cf-textarea:focus,
.ws-cf-select:focus {
	outline: none;
	border-color: var(--green);
	box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
}
.ws-cf-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.ws-cf-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 44px;
}

.ws-cf-chips {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
@media (max-width: 600px) { .ws-cf-chips { grid-template-columns: repeat(2, 1fr); } }
.ws-cf-chip {
	position: relative;
	display: block;
	cursor: pointer;
}
.ws-cf-chip input {
	position: absolute;
	opacity: 0;
	width: 0; height: 0;
}
.ws-cf-chip-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 14px 16px;
	background: #FFFFFF;
	border: 1.5px solid var(--gray-200);
	border-radius: 12px;
	transition: all 0.2s ease;
	height: 100%;
}
.ws-cf-chip-body:hover {
	border-color: var(--gray-300);
	transform: translateY(-1px);
}
.ws-cf-chip input:focus-visible + .ws-cf-chip-body {
	border-color: var(--green);
	box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
}
.ws-cf-chip input:checked + .ws-cf-chip-body {
	border-color: var(--green);
	background: var(--green-50);
	box-shadow: 0 4px 14px rgba(16,185,129,0.12);
}
.ws-cf-chip-icon { width: 22px; height: 22px; color: var(--green-deep); }
.ws-cf-chip-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	line-height: 1.3;
}
.ws-cf-chip-desc {
	font-size: 11px;
	color: var(--gray-500);
	line-height: 1.4;
}

.ws-cf-conditional {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
	margin-bottom: 0;
}
.ws-cf-conditional.is-open {
	max-height: 1100px;
	opacity: 1;
	margin-bottom: 22px;
}
.ws-cf-conditional-inner {
	padding: 22px;
	background: linear-gradient(180deg, var(--green-50) 0%, #FFFFFF 62%);
	border: 1px solid rgba(16, 185, 129, 0.22);
	border-radius: 16px;
}
.ws-cf-conditional-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 20px;
}
.ws-cf-conditional-icon {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: #FFFFFF;
	border: 1px solid rgba(16, 185, 129, 0.25);
	color: var(--green-deep);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
}
.ws-cf-conditional-icon svg { width: 20px; height: 20px; }
.ws-cf-conditional-title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0;
}
.ws-cf-optional-tag {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--green-deep);
	background: var(--green-50);
	border: 1px solid rgba(16, 185, 129, 0.3);
	padding: 2px 8px;
	border-radius: 100px;
}
.ws-cf-conditional-sub {
	font-size: 13px;
	line-height: 1.5;
	color: var(--gray-500);
	margin: 4px 0 0;
}

/* Compact textarea (system-info paste) — shorter than the message field. */
.ws-cf-textarea-sm { min-height: 96px; }

/* Collapsible "how do I get this?" helper under the system-info field. */
.ws-cf-help {
	margin-top: 10px;
	font-size: 13px;
	color: var(--ink-mute);
}
.ws-cf-help summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--green-deep);
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.ws-cf-help summary::-webkit-details-marker { display: none; }
.ws-cf-help summary::before {
	content: "";
	width: 0;
	height: 0;
	border-left: 5px solid currentColor;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform 0.2s ease;
}
.ws-cf-help[open] summary::before { transform: rotate(90deg); }
.ws-cf-help-body {
	margin-top: 8px;
	line-height: 1.6;
}
.ws-cf-help-body ul {
	margin: 6px 0;
	padding-left: 18px;
}
.ws-cf-help-body li { margin: 2px 0; }
.ws-cf-help-note {
	margin: 8px 0 0;
	color: var(--amber);
	font-size: 12px;
}

.ws-cf-counter {
	font-size: 12px;
	color: var(--gray-400);
	text-align: right;
	margin-top: 6px;
	font-variant-numeric: tabular-nums;
}
.ws-cf-counter.is-near { color: var(--amber); }
.ws-cf-counter.is-max  { color: var(--red); }

.ws-cf-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	background: var(--gray-50);
	border: 1px solid var(--gray-200);
	border-radius: 10px;
	margin-bottom: 24px;
	cursor: pointer;
}
.ws-cf-consent input {
	width: 16px; height: 16px;
	margin-top: 2px;
	accent-color: var(--green);
	flex-shrink: 0;
}
.ws-cf-consent-text {
	font-size: 13px;
	color: var(--ink-soft);
	line-height: 1.5;
}
.ws-cf-consent-text a {
	color: var(--green-deep);
	font-weight: 600;
	text-decoration: none;
}
.ws-cf-consent-text a:hover { color: var(--ink); }

.ws-cf-submit-row {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}
.ws-cf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 32px;
	font-size: 15px;
	font-weight: 600;
	color: #FFFFFF;
	background: var(--ink);
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	font-family: inherit;
	transition: all 0.25s ease;
	box-shadow: 0 6px 18px rgba(10,31,26,0.18);
}
.ws-cf-submit:hover {
	background: var(--green);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(16,185,129,0.32);
}
.ws-cf-submit:active { transform: translateY(0); }
.ws-cf-submit svg { width: 16px; height: 16px; }
.ws-cf-submit-note { font-size: 12px; color: var(--gray-500); }

.ws-cf-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---------- SUCCESS STATE (replaces the form card after submit) ---------- */
.ws-cf-success {
	background: #FFFFFF;
	border: 1px solid var(--gray-200);
	border-radius: 24px;
	padding: 56px 44px;
	text-align: center;
	box-shadow: 0 12px 40px rgba(10,31,26,0.05);
	position: relative;
	overflow: hidden;
}
.ws-cf-success::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--green-lite), var(--green), var(--green-deep));
}
@media (max-width: 720px) {
	.ws-cf-success { padding: 40px 24px; border-radius: 18px; }
}
.ws-cf-success-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	background: var(--green-50);
	border: 4px solid rgba(16,185,129,0.18);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--green-deep);
	animation: ws-cf-success-pop 0.4s ease-out;
}
.ws-cf-success-icon svg { width: 36px; height: 36px; }
@keyframes ws-cf-success-pop {
	0%   { transform: scale(0.6); opacity: 0; }
	60%  { transform: scale(1.1); opacity: 1; }
	100% { transform: scale(1.0); }
}
.ws-cf-success-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--green-deep);
	margin-bottom: 14px;
}
.ws-cf-success-title {
	font-size: clamp(28px, 3.6vw, 36px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0 0 14px;
}
.ws-cf-success-title em {
	font-style: normal;
	color: var(--green-deep);
}
.ws-cf-success-body {
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink-mute);
	margin: 0 auto 28px;
	max-width: 520px;
}
.ws-cf-success-ref {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--gray-50);
	border: 1px dashed var(--gray-300);
	border-radius: 100px;
	font-size: 13px;
	color: var(--ink-soft);
	margin-bottom: 36px;
	font-variant-numeric: tabular-nums;
}
.ws-cf-success-ref strong {
	color: var(--ink);
	font-weight: 600;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ws-cf-success-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}
.ws-cf-success-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	text-decoration: none;
	transition: all 0.2s ease;
	font-family: inherit;
}
.ws-cf-success-btn svg { width: 16px; height: 16px; }
.ws-cf-success-btn-primary,
.ws-cf-success-btn-primary:link,
.ws-cf-success-btn-primary:visited {
	background: var(--ink);
	color: #FFFFFF;
	box-shadow: 0 6px 18px rgba(10,31,26,0.18);
	border: 1.5px solid var(--ink);
}
.ws-cf-success-btn-primary:hover {
	background: var(--green);
	border-color: var(--green);
	color: #FFFFFF;
	transform: translateY(-2px);
}
.ws-cf-success-btn-ghost,
.ws-cf-success-btn-ghost:link,
.ws-cf-success-btn-ghost:visited {
	background: transparent;
	color: var(--ink);
	border: 1.5px solid var(--gray-300);
}
.ws-cf-success-btn-ghost:hover {
	border-color: var(--ink);
	background: var(--ink);
	color: #FFFFFF;
}
.ws-cf-success-hint {
	margin-top: 28px;
	font-size: 12px;
	color: var(--gray-500);
}
