/**
 * TeachMe Leads Form Styles
 * @author @tannguyen
 */
.tm-lead-form-wrapper {
	max-width: 720px;
	margin: 24px auto;
	padding: 28px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	font-family: inherit;
	box-sizing: border-box;
}

.tm-lead-form-wrapper * {
	box-sizing: border-box;
}

.tm-form-title {
	margin: 0 0 8px 0;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	text-align: center;
}

.tm-form-desc {
	margin: 0 0 20px 0;
	font-size: 15px;
	color: #4b5563;
	text-align: center;
	line-height: 1.5;
}

.tm-fields-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}

.tm-col-12 {
	flex: 0 0 100%;
	width: 100%;
}

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

@media (max-width: 640px) {
	.tm-col-6 {
		flex: 0 0 100%;
		width: 100%;
	}
	.tm-lead-form-wrapper {
		padding: 16px;
		margin: 16px auto;
	}
}

.tm-form-group {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
}

.tm-form-group label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #1f2937;
	margin-bottom: 6px;
}

.tm-req {
	color: #e02424;
	margin-left: 2px;
}

.tm-form-group input[type="text"],
.tm-form-group input[type="tel"],
.tm-form-group input[type="email"],
.tm-form-group input[type="number"],
.tm-form-group select,
.tm-form-group textarea {
	width: 100%;
	padding: 11px 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #111827;
	background-color: #f9fafb;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
}

.tm-form-group input:focus,
.tm-form-group select:focus,
.tm-form-group textarea:focus {
	outline: none;
	border-color: #1a56db;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.tm-input-error {
	border-color: #e02424 !important;
	background-color: #fdf2f2 !important;
}

/* Radio & Checkbox options */
.tm-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 6px;
}

.tm-radio-label, .tm-checkbox-label {
	display: flex !important;
	align-items: center;
	padding: 12px 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 500 !important;
	font-size: 15px !important;
	transition: all 0.15s ease;
}

.tm-radio-label:hover, .tm-checkbox-label:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
}

.tm-radio-label input, .tm-checkbox-label input {
	margin-right: 12px;
	width: 18px;
	height: 18px;
	accent-color: #1a56db;
	cursor: pointer;
}

/* Multi-Step Wizard Styles */
.tm-wizard-progress {
	margin-bottom: 24px;
}

.tm-progress-bar {
	height: 8px;
	background-color: #e5e7eb;
	border-radius: 9999px;
	overflow: hidden;
	margin-bottom: 10px;
}

.tm-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #1a56db 0%, #3b82f6 100%);
	border-radius: 9999px;
	transition: width 0.3s ease;
}

.tm-step-counter {
	font-size: 13px;
	font-weight: 600;
	color: #4b5563;
	text-align: center;
}

.tm-wizard-step {
	border: none;
	padding: 0;
	margin: 0;
}

.tm-step-legend {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 16px;
	padding: 0;
	display: block;
	width: 100%;
}

.tm-wizard-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 24px;
	gap: 12px;
}

/* Bảo đảm trạng thái ẩn của các nút Wizard không bị theme override */
.tm-lead-form .tm-wizard-controls [hidden],
.tm-lead-form .tm-wizard-controls .tm-is-hidden,
.tm-lead-form .tm-wizard-controls button[style*="display: none"],
.tm-lead-form .tm-wizard-controls button[style*="display:none"] {
	display: none !important;
}

.tm-btn-primary, .tm-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff !important;
	background-color: #1a56db;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	text-decoration: none;
}

.tm-btn-primary:hover, .tm-submit-btn:hover {
	background-color: #1e429f;
}

.tm-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #374151 !important;
	background-color: #e5e7eb;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	text-decoration: none;
}

.tm-btn-secondary:hover {
	background-color: #d1d5db;
}

.tm-form-actions {
	margin-top: 20px;
	text-align: center;
}

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

.tm-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: tm-spin 0.8s linear infinite;
}

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

.tm-form-feedback {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
}

.tm-form-feedback.success {
	background-color: #def7ec;
	color: #03543f;
	border: 1px solid #bcf0da;
}

.tm-form-feedback.error {
	background-color: #fde8e8;
	color: #9b1c1c;
	border: 1px solid #fbd5d5;
}
