/**
 * Authentication Modal Styles
 *
 * Styling for login/register modal with full mobile and desktop support.
 *
 * @package WP_Loan_Management_System
 * @since 1.0.6
 */

/* Modal Overlay */
#lms-auth-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
}

.lms-auth-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
}

/* Modal Content */
.lms-auth-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	max-width: 450px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 40px;
}

/* Close Button */
.lms-auth-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: transparent;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.lms-auth-modal-close:hover {
	color: #333;
}

/* Modal Body */
.lms-auth-modal-body h2 {
	margin: 0 0 20px;
	font-size: 24px;
	color: #333;
}

/* Forms */
.lms-auth-form {
	margin: 20px 0;
}

.lms-form-field {
	margin-bottom: 20px;
}

.lms-form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.lms-form-field input[type="text"],
.lms-form-field input[type="email"],
.lms-form-field input[type="password"] {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.lms-form-field input[type="text"]:focus,
.lms-form-field input[type="email"]:focus,
.lms-form-field input[type="password"]:focus {
	border-color: #0073aa;
	outline: none;
}

/* Checkbox Field */
.lms-form-checkbox label {
	font-weight: normal;
	display: flex;
	align-items: center;
}

.lms-form-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	cursor: pointer;
}

/* Password Requirements */
.lms-password-requirements {
	font-size: 13px;
	color: #666;
	margin: -10px 0 15px;
	padding: 10px;
	background: #f9f9f9;
	border-left: 3px solid #0073aa;
}

/* Buttons */
.lms-btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s, opacity 0.2s;
	text-decoration: none;
}

.lms-btn-primary {
	background: #0073aa;
	color: #fff;
}

.lms-btn-primary:hover {
	background: #005a87;
}

.lms-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.lms-btn-block {
	display: block;
	width: 100%;
}

/* Modal submit buttons - fixed 100px width */
#lms-login-form button[type="submit"],
#lms-register-form button[type="submit"] {
	width: 100px !important;
	display: inline-block;
	margin: 0 auto;
}

/* Messages */
.lms-auth-messages {
	margin-bottom: 20px;
}

.lms-auth-error,
.lms-auth-success {
	padding: 12px 15px;
	border-radius: 4px;
	margin-bottom: 15px;
}

.lms-auth-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.lms-auth-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

/* Toggle Links */
.lms-auth-toggle {
	margin: 20px 0 0;
	text-align: center;
	font-size: 14px;
	color: #666;
}

.lms-auth-toggle a {
	color: #0073aa;
	text-decoration: none;
	font-weight: 600;
}

.lms-auth-toggle a:hover {
	text-decoration: underline;
}

/* Body class when modal is open */
body.lms-modal-open {
	overflow: hidden;
}

/* Mobile Styles (< 600px) */
@media (max-width: 600px) {
	.lms-auth-modal-content {
		width: 95%;
		padding: 30px 20px;
		max-height: 90vh;
	}

	.lms-auth-modal-body h2 {
		font-size: 20px;
		margin-bottom: 15px;
	}

	.lms-form-field input[type="text"],
	.lms-form-field input[type="email"],
	.lms-form-field input[type="password"] {
		min-height: 48px;
		font-size: 16px; /* Prevent iOS zoom */
	}

	.lms-btn {
		min-height: 48px;
		padding: 14px 20px;
		font-size: 16px;
	}

	.lms-auth-modal-close {
		width: 44px;
		height: 44px;
		font-size: 28px;
		top: 10px;
		right: 10px;
	}

	.lms-form-checkbox input[type="checkbox"] {
		width: 20px;
		height: 20px;
		margin-right: 10px;
	}

	.lms-form-field {
		margin-bottom: 18px;
	}
}

/* Tablet Styles (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
	.lms-auth-modal-content {
		max-width: 500px;
	}
}

/* Accessibility */
.lms-auth-modal-close:focus,
.lms-form-field input:focus,
.lms-btn:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Menu Icon Styles */
.lms-login-menu-item .dashicons,
.lms-register-menu-item .dashicons,
.lms-user-menu-item .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	vertical-align: middle;
	margin-right: 5px;
}

.lms-menu-text {
	vertical-align: middle;
}
