/**
 * Elementor Custom Form Builder - Premium Responsive Stylesheet
 * Fully Compatible with Elementor Live Editor Preview & Published Frontend
 */

.efb-form-wrapper {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
	color: #0f172a;
	line-height: 1.5;
	position: relative;
}

.efb-form-wrapper *,
.efb-form-wrapper *::before,
.efb-form-wrapper *::after {
	box-sizing: border-box;
}

.efb-form-wrapper .efb-form {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

/* ========================================================
   Form Grid & Flexbox Columns
   ======================================================== */
.efb-form-wrapper .efb-form-grid {
	display: flex !important;
	flex-wrap: wrap !important;
	width: 100% !important;
	max-width: 100% !important;
	gap: 18px 16px;
	margin: 0;
	padding: 0;
	border: none;
}

.efb-form-wrapper .efb-field-item {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	margin: 0;
	padding: 0;
	float: none !important;
	position: relative;
}

/* Precise Widths Accounting for Gap (16px) */
.efb-form-wrapper .efb-col-100 {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
}

.efb-form-wrapper .efb-col-75 {
	flex: 0 0 calc(75% - 4px) !important;
	width: calc(75% - 4px) !important;
	max-width: calc(75% - 4px) !important;
}

.efb-form-wrapper .efb-col-66 {
	flex: 0 0 calc(66.666% - 5.33px) !important;
	width: calc(66.666% - 5.33px) !important;
	max-width: calc(66.666% - 5.33px) !important;
}

.efb-form-wrapper .efb-col-50 {
	flex: 0 0 calc(50% - 8px) !important;
	width: calc(50% - 8px) !important;
	max-width: calc(50% - 8px) !important;
}

.efb-form-wrapper .efb-col-33 {
	flex: 0 0 calc(33.333% - 10.66px) !important;
	width: calc(33.333% - 10.66px) !important;
	max-width: calc(33.333% - 10.66px) !important;
}

.efb-form-wrapper .efb-col-25 {
	flex: 0 0 calc(25% - 12px) !important;
	width: calc(25% - 12px) !important;
	max-width: calc(25% - 12px) !important;
}

.efb-form-wrapper .efb-col-20 {
	flex: 0 0 calc(20% - 12.8px) !important;
	width: calc(20% - 12.8px) !important;
	max-width: calc(20% - 12.8px) !important;
}

/* Mobile Breakpoint: Auto-Stack on Small Viewports */
@media (max-width: 640px) {
	.efb-form-wrapper .efb-field-item {
		flex: 0 0 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* ========================================================
   Labels
   ======================================================== */
.efb-form-wrapper .efb-field-label {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #1e293b;
	margin: 0 0 7px 0;
	padding: 0;
	text-align: left;
	float: none !important;
	clear: both !important;
	cursor: pointer;
}

.efb-form-wrapper .efb-required-mark {
	color: #ef4444;
	font-weight: 700;
	margin-left: 3px;
}

/* ========================================================
   Inputs, Textarea & Select
   ======================================================== */
.efb-form-wrapper .efb-input,
.efb-form-wrapper .efb-textarea,
.efb-form-wrapper .efb-select {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: 48px;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: #0f172a;
	background-color: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	outline: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box !important;
	float: none !important;
	clear: both !important;
}

.efb-form-wrapper .efb-input::placeholder,
.efb-form-wrapper .efb-textarea::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.efb-form-wrapper .efb-input:hover,
.efb-form-wrapper .efb-textarea:hover,
.efb-form-wrapper .efb-select:hover {
	border-color: #94a3b8;
}

.efb-form-wrapper .efb-input:focus,
.efb-form-wrapper .efb-textarea:focus,
.efb-form-wrapper .efb-select:focus {
	border-color: #2563eb;
	background-color: #ffffff;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.efb-form-wrapper .efb-input.efb-error,
.efb-form-wrapper .efb-textarea.efb-error {
	border-color: #ef4444;
	background-color: #fffafa;
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

/* Textarea */
.efb-form-wrapper .efb-textarea {
	height: auto;
	min-height: 120px;
	resize: vertical;
	line-height: 1.6;
}

/* Custom Dropdown Select */
.efb-form-wrapper .efb-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' 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 14px center;
	background-size: 16px;
	padding-right: 42px;
	cursor: pointer;
}

/* Radio & Checkbox Choices */
.efb-form-wrapper .efb-choices-wrap {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px;
	margin-top: 4px;
	width: 100%;
}

.efb-form-wrapper .efb-choice-label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
	user-select: none;
}

.efb-form-wrapper .efb-choice-label input {
	cursor: pointer;
	margin: 0;
	width: 18px;
	height: 18px;
	accent-color: #2563eb;
}

/* ========================================================
   Submit Button
   ======================================================== */
.efb-form-wrapper .efb-submit-wrap {
	display: flex !important;
	margin-top: 24px;
	width: 100%;
}

.efb-form-wrapper .efb-submit-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px;
	height: 48px;
	padding: 0 32px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #ffffff;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
	outline: none;
	text-decoration: none;
	line-height: 1;
}

.efb-form-wrapper .efb-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.efb-form-wrapper .efb-submit-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.efb-form-wrapper .efb-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* Spinner */
.efb-form-wrapper .efb-btn-spinner {
	width: 16px;
	height: 16px;
	border: 2.5px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: efb-spin 0.8s linear infinite;
	display: inline-block;
}

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

/* ========================================================
   Alert Feedback Message
   ======================================================== */
.efb-form-wrapper .efb-alert {
	margin-top: 18px;
	padding: 14px 20px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	animation: efb-fade 0.25s ease-out;
	display: flex;
	align-items: center;
	gap: 10px;
}

.efb-form-wrapper .efb-alert-success {
	background-color: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.efb-form-wrapper .efb-alert-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.08);
}

@keyframes efb-fade {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   Elementor Editor Preview Live Enhancements
   ======================================================== */
body.elementor-editor-active .efb-form-wrapper,
.elementor-editor-active .efb-form-wrapper,
.elementor-editor-preview .efb-form-wrapper {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

body.elementor-editor-active .efb-submit-btn,
.elementor-editor-active .efb-submit-btn {
	user-select: none;
}
