/* =============================================================================
   Contact Form Mailer — Styles
   ============================================================================= */

/* Wrapper */
.cfm-wrapper {
	/* max-width: 720px; */
	margin: 0 auto;
	/* padding: 16px; */
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
}

/* Card */
.cfm-form {
	background: #ffffff;
	border-radius: 14px;
	padding: 44px 48px;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Hide honeypot completely */
.cfm-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	visibility: hidden;
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                       */
/* -------------------------------------------------------------------------- */

.cfm-row {
	margin-bottom: 22px;
}

.cfm-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* -------------------------------------------------------------------------- */
/* Field base                                                                   */
/* -------------------------------------------------------------------------- */

.cfm-field {
	display: flex;
	flex-direction: column;
}

.cfm-field label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 7px;
	letter-spacing: 0.01em;
}

.cfm-required {
	color: #ef4444;
	margin-left: 1px;
}

/* Inputs & textarea */
.cfm-field input[type="text"],
.cfm-field input[type="email"],
.cfm-field input[type="tel"],
.cfm-field textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e5e7eb;
	border-radius: 9px;
	font-size: 15px;
	color: #111827;
	background: #f9fafb;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
	box-sizing: border-box;
	outline: none;
	font-family: inherit;
	line-height: 1.5;
}

.cfm-field input[type="text"]:hover,
.cfm-field input[type="email"]:hover,
.cfm-field input[type="tel"]:hover,
.cfm-field textarea:hover {
	border-color: #d1d5db;
}

.cfm-field input[type="text"]:focus,
.cfm-field input[type="email"]:focus,
.cfm-field input[type="tel"]:focus,
.cfm-field textarea:focus {
	border-color: #3b82f6;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* Validation states */
.cfm-field input.cfm-input-error,
.cfm-field textarea.cfm-input-error {
	border-color: #ef4444;
	background: #fff8f8;
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.cfm-field input.cfm-input-valid,
.cfm-field textarea.cfm-input-valid {
	border-color: #22c55e;
	background: #f0fdf4;
}

/* Textarea */
.cfm-field textarea {
	resize: vertical;
	min-height: 150px;
}

/* Character counter */
.cfm-char-count {
	font-size: 11px;
	color: #9ca3af;
	text-align: right;
	margin-top: 4px;
}

/* Inline error messages */
.cfm-error {
	font-size: 12px;
	color: #ef4444;
	margin-top: 5px;
	display: none;
	align-items: center;
	gap: 4px;
}

.cfm-error.cfm-visible {
	display: flex;
}

.cfm-error::before {
	content: '⚠';
	font-size: 11px;
}

/* -------------------------------------------------------------------------- */
/* Checkbox / Privacy                                                           */
/* -------------------------------------------------------------------------- */

.cfm-checkbox-field {
	gap: 6px;
}

.cfm-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14px !important;
	font-weight: normal !important;
	color: #4b5563 !important;
	margin-bottom: 0 !important;
}

.cfm-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin-top: 1px;
	cursor: pointer;
	accent-color: #3b82f6;
	border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/* Submit button                                                                */
/* -------------------------------------------------------------------------- */

.cfm-submit-row {
	margin-top: 8px;
	margin-bottom: 0;
}

.cfm-submit-btn {
	background-color: transparent !important;
    padding: 0 !important;
}
/* 
.cfm-submit-btn:hover:not(:disabled) {
	opacity: 0.92;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.cfm-submit-btn:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
} */

.cfm-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Spinner */
.cfm-btn-spinner {
	display: none;
	width: 17px;
	height: 17px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: cfm-spin 0.65s linear infinite;
	flex-shrink: 0;
}

.cfm-submit-btn.cfm-loading .cfm-btn-spinner {
	display: block;
}

@keyframes cfm-spin {
	to {
		transform: rotate(360deg);
	}
}

/* -------------------------------------------------------------------------- */
/* Response messages                                                            */
/* -------------------------------------------------------------------------- */

.cfm-response {
	margin-top: 22px;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.6;
}

.cfm-response.cfm-success {
	padding: 16px 20px 16px 44px;
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #166534;
	position: relative;
}

.cfm-response.cfm-success::before {
	content: '✓';
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	font-weight: 700;
	color: #22c55e;
}

.cfm-response.cfm-error-msg {
	padding: 16px 20px 16px 44px;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
	position: relative;
}

.cfm-response.cfm-error-msg::before {
	content: '✕';
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	font-weight: 700;
	color: #ef4444;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                   */
/* -------------------------------------------------------------------------- */

@media (max-width: 640px) {
	.cfm-form {
		padding: 28px 20px;
	}

	.cfm-two-col {
		grid-template-columns: 1fr;
		gap: 0;
	}

	/* With single column, treat two-col rows as normal stacked rows */
	.cfm-two-col .cfm-field {
		margin-bottom: 22px;
	}

	.cfm-two-col .cfm-field:last-child {
		margin-bottom: 0;
	}

	.cfm-submit-btn {
		width: 100%;
		justify-content: center;
	}
}
