.ycf-form {
	--ycf-border: #d8dee8;
	--ycf-text: #1f2937;
	--ycf-heading: #111827;
	--ycf-muted: #64748b;
	--ycf-accent: #2563eb;
	--ycf-button-text: #fff;
	--ycf-form-background: transparent;
	--ycf-field-background: #fff;
	--ycf-radius: 6px;
	--ycf-form-padding: 0;
	--ycf-field-gap: 16px;
	background: var(--ycf-form-background);
	border-radius: var(--ycf-radius);
	color: var(--ycf-text);
	display: grid;
	font-family: var(--ycf-font-family, inherit);
	gap: var(--ycf-field-gap);
	max-width: 760px;
	padding: var(--ycf-form-padding);
}

.ycf-fields {
	display: grid;
	gap: var(--ycf-field-gap);
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ycf-field {
	display: grid;
	gap: 6px;
}

.ycf-section {
	border-bottom: var(--ycf-section-border, 2px solid var(--ycf-border));
	margin-top: 32px;
	padding: 14px 0 10px;
}

.ycf-fields > .ycf-section:first-child {
	margin-top: 0;
}

.ycf-section h3 {
	color: var(--ycf-heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.ycf-section p {
	color: var(--ycf-muted);
	margin: 6px 0 0;
	font-size: 0.9rem;
}

.ycf-col-1 {
	grid-column: span 1;
}

.ycf-col-2 {
	grid-column: span 2;
}

.ycf-col-3 {
	grid-column: span 3;
}

.ycf-col-4 {
	grid-column: span 4;
}

.ycf-col-5 {
	grid-column: span 5;
}

.ycf-col-6 {
	grid-column: span 6;
}

.ycf-field label {
	font-weight: 650;
}

.ycf-required {
	color: #ef4444 !important;
	margin-left: 3px;
	font-weight: 700;
}

.ycf-field small {
	color: var(--ycf-muted);
}

.ycf-field input:not([type="checkbox"]):not([type="radio"]),
.ycf-field select,
.ycf-field textarea {
	background: var(--ycf-field-background);
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	box-sizing: border-box;
	color: var(--ycf-text);
	min-height: 42px;
	padding: 9px 11px;
	width: 100%;
}

.ycf-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(textarea),
.ycf-field select {
	height: 42px;
}

.ycf-field textarea {
	min-height: 120px;
}

.ycf-choice {
	align-items: center;
	display: flex;
	gap: 8px;
	font-weight: 400 !important;
}

.ycf-choice-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ycf-choice-stacked {
	flex-direction: column;
	flex-wrap: nowrap;
}

.ycf-choice-stacked .ycf-choice {
	width: 100%;
}

.ycf-choice-buttons .ycf-choice {
	background: var(--ycf-field-background);
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	cursor: pointer;
	min-height: 42px;
	padding: 9px 12px;
}

.ycf-choice-cards .ycf-choice {
	background: var(--ycf-field-background);
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	cursor: pointer;
	min-height: var(--ycf-card-min-height, 80px);
	padding: 9px 12px;
}

.ycf-choice-cards .ycf-choice {
	flex: 1 1 180px;
}

.ycf-choice-buttons input,
.ycf-choice-cards input {
	accent-color: var(--ycf-accent);
}

.ycf-choice-buttons .ycf-choice:has(input:checked),
.ycf-choice-cards .ycf-choice:has(input:checked) {
	border-color: var(--ycf-accent);
	box-shadow: 0 0 0 1px var(--ycf-accent);
}

.ycf-submit {
	align-self: start;
	background: var(--ycf-accent);
	border: 0;
	border-radius: var(--ycf-radius);
	color: var(--ycf-button-text);
	cursor: pointer;
	font-weight: 700;
	min-height: 44px;
	padding: 0 20px;
}

.ycf-submit-wrapper {
	display: flex;
	width: 100%;
}

.ycf-submit-wrapper.ycf-submit-align-left {
	justify-content: flex-start;
}

.ycf-submit-wrapper.ycf-submit-align-center {
	justify-content: center;
}

.ycf-submit-wrapper.ycf-submit-align-right {
	justify-content: flex-end;
}

.ycf-submit-wrapper.ycf-submit-align-full {
	justify-content: stretch;
}

.ycf-submit-wrapper.ycf-submit-align-full .ycf-submit {
	width: 100%;
	flex: 1;
}

.ycf-submit:disabled {
	cursor: wait;
	opacity: .65;
}

.ycf-form-preview .ycf-submit:disabled {
	cursor: not-allowed;
}

.ycf-message {
	border-radius: var(--ycf-radius);
	display: none;
	padding: 12px 16px;
	box-sizing: border-box;
	font-size: 0.95rem;
}

.ycf-message.is-success,
.ycf-message.is-error {
	display: block;
	animation: ycfFadeIn 0.3s ease;
}

.ycf-message.is-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
	padding: 40px 24px;
	text-align: center;
	font-size: 1.1rem;
	font-weight: 650;
	box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.05);
}

.ycf-message.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fca5a5;
	margin-bottom: 16px;
}

.ycf-turnstile-missing {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 6px;
	color: #9a3412;
	padding: 10px 12px;
}

@media (max-width: 720px) {
	.ycf-form:not(#ycf-live-preview-container) .ycf-fields {
		grid-template-columns: 1fr;
	}

	.ycf-form:not(#ycf-live-preview-container) .ycf-col-1,
	.ycf-form:not(#ycf-live-preview-container) .ycf-col-2,
	.ycf-form:not(#ycf-live-preview-container) .ycf-col-3,
	.ycf-form:not(#ycf-live-preview-container) .ycf-col-4,
	.ycf-form:not(#ycf-live-preview-container) .ycf-col-5,
	.ycf-form:not(#ycf-live-preview-container) .ycf-col-6 {
		grid-column: span 1;
	}
}

@keyframes ycfFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
