/**
 * Frontend Form Styling for Magnet CRM Lead Forms.
 * Supports Multi-Column Flexbox Grid & Advanced Custom Colors.
 */

.magnetcrm-form-wrapper {
	max-width: 680px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

.magnetcrm-form-wrapper * {
	box-sizing: inherit;
}

.magnetcrm-lead-form {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	transition: box-shadow 0.2s ease;
}

.magnetcrm-lead-form:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

/* Multi-Column Layout Grid */
.magnetcrm-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.magnetcrm-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-sizing: border-box;
}

.magnetcrm-col-100 {
	flex: 0 0 100%;
	max-width: 100%;
}

.magnetcrm-col-50 {
	flex: 0 0 calc(50% - 8px);
	max-width: calc(50% - 8px);
}

.magnetcrm-col-33 {
	flex: 0 0 calc(33.333% - 11px);
	max-width: calc(33.333% - 11px);
}

.magnetcrm-col-25 {
	flex: 0 0 calc(25% - 12px);
	max-width: calc(25% - 12px);
}

@media (max-width: 640px) {
	.magnetcrm-col-50,
	.magnetcrm-col-33,
	.magnetcrm-col-25 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

.magnetcrm-form-group label {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

.magnetcrm-required-mark {
	color: #ef4444;
	margin-left: 2px;
}

.magnetcrm-input {
	width: 100%;
	padding: 11px 14px;
	font-size: 15px;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.magnetcrm-input:focus {
	border-color: #6366f1 !important;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.magnetcrm-options-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 4px;
}

.magnetcrm-option-label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	font-weight: 400 !important;
	font-size: 14px !important;
	cursor: pointer;
}

.magnetcrm-option-label input[type="radio"],
.magnetcrm-option-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
}

.magnetcrm-submit-wrapper {
	margin-top: 24px;
}

.magnetcrm-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 24px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.1s ease;
}

.magnetcrm-submit-btn:hover {
	filter: brightness(1.1);
}

.magnetcrm-submit-btn:active {
	transform: scale(0.99);
}

.magnetcrm-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.magnetcrm-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: magnetcrm-spin 0.6s linear infinite;
}

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

.magnetcrm-alert {
	margin-top: 16px;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.magnetcrm-alert-success {
	background-color: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.magnetcrm-alert-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
