/**
 * Custom Registration Fields Styles
 */

/* Custom Fields Section Container */
.learndash-custom-fields-section {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid #e0e0e0;
}

/* Custom Field Styling */
.learndash-registration-field-institution,
.learndash-registration-field-exam-round,
.learndash-registration-field-identity-url,
.learndash-registration-field-line-id,
.learndash-registration-field-referral-source {
	margin-bottom: 1.5rem;
}

.learndash-registration-field-institution label,
.learndash-registration-field-exam-round label,
.learndash-registration-field-identity-url label,
.learndash-registration-field-line-id label,
.learndash-registration-field-referral-source label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #333;
}

.learndash-registration-field-institution input,
.learndash-registration-field-exam-round input,
.learndash-registration-field-identity-url input,
.learndash-registration-field-line-id input,
.learndash-registration-field-referral-source select {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.learndash-registration-field-institution input:focus,
.learndash-registration-field-exam-round input:focus,
.learndash-registration-field-identity-url input:focus,
.learndash-registration-field-line-id input:focus,
.learndash-registration-field-referral-source select:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Terms Acceptance Checkbox */
.learndash-registration-field-terms-acceptance {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background-color: #f5f5f5;
	border-radius: 4px;
}

.learndash-registration-field-terms-acceptance .checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 500;
	margin: 0;
	cursor: pointer;
}

.learndash-registration-field-terms-acceptance input[type="checkbox"] {
	width: auto;
	margin: 0;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.learndash-registration-field-terms-acceptance .checkbox-text {
	margin: 0;
	color: #d32f2f;
	font-weight: 600;
}

/* Terms Notes Section */
.learndash-registration-terms-notes {
	margin-top: 2rem;
	padding: 1.5rem;
	background-color: #fff3e0;
	border-left: 4px solid #ff9800;
	border-radius: 4px;
    margin-bottom: 15px;
}

.learndash-registration-terms-notes h4 {
	margin-top: 0;
	margin-bottom: 1rem;
	color: #e65100;
	font-weight: 600;
}

.learndash-registration-terms-notes ul {
	margin: 0;
	padding-left: 1.5rem;
	list-style-type: disc;
}

.learndash-registration-terms-notes li {
	margin-bottom: 0.75rem;
	color: #333;
	font-size: 0.95rem;
	line-height: 1.5;
}

.learndash-registration-terms-notes li:last-child {
	margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.learndash-custom-fields-section {
		margin-top: 1.5rem;
		padding-top: 1.5rem;
	}

	.learndash-registration-terms-notes {
		padding: 1rem;
	}

	.learndash-registration-terms-notes h4 {
		font-size: 1rem;
	}

	.learndash-registration-terms-notes li {
		font-size: 0.9rem;
	}
}

/* Submit Button Styling for Registration Form */
#learndash_registerform input[type="submit"] {
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
}

#learndash_registerform input[type="submit"]:disabled,
#learndash_registerform input[type="submit"].disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #cccccc !important;
	border-color: #999999 !important;
	color: #666666 !important;
}

#learndash_registerform input[type="submit"]:disabled:hover,
#learndash_registerform input[type="submit"].disabled:hover {
	background-color: #cccccc !important;
	border-color: #999999 !important;
}

/* Loading State Animation */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

#learndash_registerform input[type="submit"].loading {
	opacity: 0.7;
	cursor: not-allowed;
	background-color: #0073aa !important;
	border-color: #005a87 !important;
	color: #ffffff !important;
}

#learndash_registerform input[type="submit"].loading::before {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 8px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	vertical-align: middle;
	position: relative;
	top: -2px;
}

/* Frontend Custom Fields Section */
.wpt-lms-custom-fields-frontend {
	margin-top: 3rem;
	padding: 2rem;
	background-color: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.wpt-lms-custom-fields-frontend h3 {
	margin-top: 0;
	margin-bottom: 1.5rem;
	color: #333;
	font-size: 1.25rem;
	font-weight: 600;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 0.75rem;
}

.wpt-lms-custom-fields-frontend .form-group {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
}

.wpt-lms-custom-fields-frontend label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #333;
	font-size: 0.95rem;
}

.wpt-lms-custom-fields-frontend .form-control {
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.wpt-lms-custom-fields-frontend .form-control:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.wpt-lms-custom-fields-frontend button {
	padding: 0.75rem 1.5rem;
	background-color: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.wpt-lms-custom-fields-frontend button:hover {
	background-color: #005a87;
}

.wpt-lms-custom-fields-frontend button:active {
	background-color: #004470;
}

/* Responsive Design for Frontend Fields */
@media (max-width: 768px) {
	.wpt-lms-custom-fields-frontend {
		padding: 1.5rem;
	}

	.wpt-lms-custom-fields-frontend h3 {
		font-size: 1.1rem;
		margin-bottom: 1rem;
	}

	.wpt-lms-custom-fields-frontend .form-group {
		margin-bottom: 1rem;
	}

	.wpt-lms-custom-fields-frontend label {
		font-size: 0.9rem;
	}

	.wpt-lms-custom-fields-frontend .form-control {
		padding: 0.6rem;
		font-size: 0.95rem;
	}

	.wpt-lms-custom-fields-frontend button {
		padding: 0.6rem 1.2rem;
		font-size: 0.95rem;
	}
}
