/* ==========================================
   GLOBAL ERROR MESSAGE (API / SERVER)
========================================== */

.callback-error-message {
	display: none;
	margin-bottom: 24px;
	padding: 14px 18px;
	border: 1px solid #dc2626;
	background: #fff5f5;
	border-radius: 8px;
}

.callback-error-message p {
	margin: 0;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}


/* ==========================================
   FIELD ERROR MESSAGE (INLINE)
========================================== */

.field-error-message {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #dc2626;
	line-height: 1.4;
}


/* ==========================================
   INPUT / TEXTAREA / SELECT ERROR STATE
========================================== */

.hl-text-input.field-error,
.hl-select-input.field-error,
.hl-upload-input.field-error,
textarea.field-error {
	border: 1px solid #dc2626 !important;
	background-color: #fff5f5;
	box-shadow: none !important;
	outline: none !important;
	transition: all 0.2s ease;
}


/* Focus state when error exists */
.field-error:focus {
	border-color: #dc2626 !important;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}


/* ==========================================
   FIELD WRAPPER ERROR STATES
========================================== */

.call-back__details__input.field-error,
.call-back__message.field-error,
.call-back__select.field-error,
/* .forms__upload-input-container.field-error, */
.call-back__checkbox.field-error,
.call-back__radio.field-error,
.call-back__upload.field-error,
.privacy-checkbox.field-error {
	border: 1px solid #dc2626;
	background: #fff5f5;
	border-radius: 8px;
	padding: 12px;
}


/* ==========================================
   CHECKBOX GROUP - FIX (IMPORTANT)
========================================== */

.call-back__checkbox {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 20px;
	align-items: start;
}

/* Each checkbox label */
.hl-checkbox-input {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

/* Force error message BELOW entire group */
.call-back__checkbox .field-error-message {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: 8px;
}


/* ==========================================
   RADIO GROUP
========================================== */

.call-back__radio {
	display: flex;
	flex-direction: column;
	gap: 8px;
}


/* ==========================================
   UPLOAD FIELD
========================================== */

.forms__upload-input-container {
	display: flex;
	flex-direction: column;
}


/* ==========================================
   PRIVACY CHECKBOX
========================================== */

.privacy-checkbox {
	display: flex;
	flex-direction: column;
	gap: 6px;
}


/* ==========================================
   ERROR ANIMATION (SMOOTH UX)
========================================== */

.field-error-message,
.callback-error-message {
	transition: all 0.2s ease-in-out;
	opacity: 1;
}


/* Optional fade-in behavior */
.field-error-message:empty {
	display: none;
}


/* ==========================================
   SUCCESS STATE (FUTURE USE)
========================================== */

.field-success {
	border: 1px solid #16a34a !important;
	background: #f0fdf4;
}


/* ==========================================
   Simple Form CSS
========================================== */

/* =========================
   Success / Common Message
   ========================= */

.form-message {
	max-width: 600px;
	margin: 30px auto;
	padding: 35px;
	border-radius: 16px;
	text-align: center;
	animation: fadeInUp 0.4s ease;
}

.success-message {
	background: #f0fff4;
	border: 2px solid #22c55e;
	box-shadow: 0 10px 30px rgba(34, 197, 94, 0.12);
}

.success-icon {
	width: 70px;
	height: 70px;
	margin: 0 auto 20px;
	background: #22c55e;
	color: #fff;
	border-radius: 50%;
	font-size: 36px;
	line-height: 70px;
	font-weight: bold;
}

.success-message h3 {
	margin: 0 0 15px;
	color: #374151 !important;
	font-size: 28px;
	font-weight: 700;
}

.success-message p {
	margin: 10px 0;
	color: #374151;
	line-height: 1.6;
	font-size: 16px;
}

/* =========================
   Error Alert
   ========================= */

.form-error-alert {
	background: #fef2f2;
	border: 1px solid #ef4444;
	color: #b91c1c;
	padding: 14px 20px;
	border-radius: 10px;
	margin: 0 0 20px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	text-align: center;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
	animation: fadeInUp 0.3s ease;
}

/* =========================
   Loader
   ========================= */

.form-loader {
	text-align: center;
	padding: 20px;
	margin-bottom: 20px;
	animation: fadeInUp 0.3s ease;
}

.loader-spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto 12px;
	border: 4px solid #e5e7eb;
	border-top: 4px solid #22c55e;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.form-loader p {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	color: #ffffff;
	line-height: 1.5;
}

/* =========================
   Animations
   ========================= */

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(15px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}