/**
 * NEF Login Modal Styles
 *
 * @package NEF_Platform_Core
 * @since 1.0.0
 */

/* ==========================================================================
   1. Modal Base
   ========================================================================== */

.nef-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nef-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(17, 24, 39, 0.75);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.nef-modal-container {
	position: relative;
	width: 100%;
	max-width: 480px;
	margin: 20px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	animation: nef-modal-appear 0.2s ease-out;
}

@keyframes nef-modal-appear {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.nef-modal-content {
	padding: 40px;
}

.nef-modal-footer {
	padding: 20px 40px;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	text-align: center;
}

.nef-modal-footer p {
	margin: 0;
	font-size: 14px;
	color: #6b7280;
}

.nef-modal-footer a {
	color: #7c3aed;
	text-decoration: none;
	font-weight: 500;
}

.nef-modal-footer a:hover {
	color: #6d28d9;
	text-decoration: underline;
}

/* Body scroll lock */
body.nef-modal-open {
	overflow: hidden;
}

/* ==========================================================================
   2. Close Button
   ========================================================================== */

.nef-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #9ca3af;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s;
	z-index: 10;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nef-modal-close:hover {
	color: #374151;
}

/* ==========================================================================
   3. Form Styles
   ========================================================================== */

.nef-form h2 {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.nef-form-intro {
	margin: 0 0 32px;
	font-size: 15px;
	color: #6b7280;
	line-height: 1.5;
}

.nef-form-group {
	margin-bottom: 20px;
}

.nef-form-row {
	display: flex;
	gap: 16px;
	margin-bottom: 0;
}

.nef-form-half {
	flex: 1;
}

.nef-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
}

.nef-form label .required {
	color: #dc2626;
}

.nef-form input[type="text"],
.nef-form input[type="email"],
.nef-form input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	color: #111827;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.nef-form input[type="text"]:focus,
.nef-form input[type="email"]:focus,
.nef-form input[type="password"]:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.nef-form input[type="text"]::placeholder,
.nef-form input[type="email"]::placeholder,
.nef-form input[type="password"]::placeholder {
	color: #9ca3af;
}

.nef-form-hint {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: #6b7280;
}

/* Checkbox */
.nef-form-checkbox {
	margin-bottom: 24px;
}

.nef-form-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
	margin-bottom: 0;
}

.nef-form-checkbox input[type="checkbox"] {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.nef-form-checkbox label span {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.5;
}

.nef-form-checkbox a {
	color: #7c3aed;
	text-decoration: none;
}

.nef-form-checkbox a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.nef-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	box-sizing: border-box;
}

.nef-btn-primary {
	color: #ffffff;
	background: #7c3aed;
}

.nef-btn-primary:hover:not(:disabled) {
	background: #6d28d9;
}

.nef-btn-primary:disabled {
	background: #a78bfa;
	cursor: not-allowed;
}

.nef-btn-outline {
	color: #7c3aed;
	background: #ffffff;
	border: 2px solid #7c3aed;
}

.nef-btn-outline:hover:not(:disabled) {
	background: #f5f3ff;
}

.nef-btn-full {
	width: 100%;
}

.nef-btn-loading {
	display: none;
}

/* ==========================================================================
   5. Spinner
   ========================================================================== */

.nef-spinner {
	width: 20px;
	height: 20px;
	animation: nef-spin 1s linear infinite;
}

@keyframes nef-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   6. Messages
   ========================================================================== */

.nef-form-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 16px;
}

.nef-message-success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.nef-message-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* ==========================================================================
   7. Form Links
   ========================================================================== */

.nef-form-link {
	margin: 24px 0 0;
	text-align: center;
	font-size: 14px;
	color: #6b7280;
}

.nef-form-link a {
	color: #7c3aed;
	text-decoration: none;
	font-weight: 500;
}

.nef-form-link a:hover {
	color: #6d28d9;
	text-decoration: underline;
}

/* ==========================================================================
   8. Registration Page
   ========================================================================== */

.nef-register-wrapper {
	max-width: 1200px;
	margin: 60px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: start;
}

.nef-register-container {
	background: #ffffff;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nef-register-container h1 {
	margin: 0 0 12px;
	font-size: 32px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.nef-register-intro {
	margin: 0 0 32px;
	font-size: 16px;
	color: #6b7280;
	line-height: 1.6;
}

.nef-register-facilitator {
	position: sticky;
	top: 40px;
}

.nef-facilitator-cta {
	background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
	color: #ffffff;
	border-radius: 12px;
	padding: 40px;
	text-align: center;
}

.nef-facilitator-cta h3 {
	margin: 0 0 16px;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
}

.nef-facilitator-cta p {
	margin: 0 0 24px;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.6;
}

.nef-facilitator-cta .nef-btn-outline {
	color: #ffffff;
	border-color: #ffffff;
	background: transparent;
}

.nef-facilitator-cta .nef-btn-outline:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   9. Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.nef-modal-container {
		margin: 0;
		border-radius: 0;
		max-width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	.nef-modal-content {
		padding: 24px;
		flex: 1;
		overflow-y: auto;
	}

	.nef-modal-footer {
		padding: 16px 24px;
	}

	.nef-form h2 {
		font-size: 24px;
	}

	.nef-register-wrapper {
		grid-template-columns: 1fr;
		gap: 40px;
		margin: 40px auto;
	}

	.nef-register-container {
		padding: 24px;
	}

	.nef-register-container h1 {
		font-size: 28px;
	}

	.nef-form-row {
		flex-direction: column;
		gap: 0;
	}

	.nef-register-facilitator {
		position: static;
	}

	.nef-facilitator-cta {
		padding: 32px 24px;
	}

	.nef-facilitator-cta h3 {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.nef-modal-content {
		padding: 20px;
	}

	.nef-form h2 {
		font-size: 22px;
	}

	.nef-register-container {
		padding: 20px;
	}

	.nef-register-container h1 {
		font-size: 24px;
	}

	.nef-facilitator-cta {
		padding: 24px 20px;
	}
}

/* ==========================================================================
   10. Accessibility
   ========================================================================== */

.nef-form input:focus-visible,
.nef-btn:focus-visible {
	outline: 2px solid #7c3aed;
	outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.nef-modal-container {
		animation: none;
	}

	.nef-spinner {
		animation: none;
	}

	* {
		transition: none !important;
	}
}
