/* ========================================
   Authentication Modals
   ======================================== */

.auth-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.auth-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

.auth-modal-content {
	position: relative;
	background: var(--white);
	border-radius: var(--radius-lg);
	width: 90%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 40px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

.auth-modal.is-open .auth-modal-content {
	transform: scale(1);
}

.auth-modal-close {
	position: absolute;
	top: 16px;
	left: 16px;
	background: transparent;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: var(--text-secondary);
	transition: color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-modal-close:hover {
	color: var(--deep-forest);
}

.auth-modal-header {
	text-align: center;
	margin-bottom: 32px;
}

.auth-modal-header h2 {
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 600;
	color: var(--deep-forest);
	margin: 0 0 8px 0;
}

.auth-modal-header p {
	font-size: 15px;
	color: var(--text-secondary);
	margin: 0;
}

/* ========================================
   Auth Form
   ======================================== */

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-field label {
	font-family: var(--font-heading);
	font-size: 14px;
	font-weight: 500;
	color: var(--deep-forest);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	font-size: 15px;
	font-family: var(--font-body);
	color: var(--deep-forest);
	background: var(--white);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
	outline: none;
	border-color: var(--olive);
	box-shadow: 0 0 0 3px rgba(139, 149, 88, 0.1);
}

.form-field-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
}

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

.form-field-checkbox label {
	font-size: 14px;
	color: var(--text-secondary);
	cursor: pointer;
	margin: 0;
}

/* ========================================
   Auth Messages
   ======================================== */

.auth-error,
.auth-success {
	padding: 12px 16px;
	border-radius: var(--radius-md);
	font-size: 14px;
	line-height: 1.5;
}

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

.auth-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.auth-error.hidden,
.auth-success.hidden {
	display: none;
}

.btn-loader.hidden {
	display: none;
}

/* ========================================
   Auth Buttons
   ======================================== */

.btn-full {
	width: 100%;
	justify-content: center;
}

.btn-primary {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 24px;
	background: var(--olive);
	color: var(--white);
	border: none;
	border-radius: var(--radius-md);
	font-family: var(--font-heading);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-primary:hover {
	background: var(--deep-forest);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(30, 59, 52, 0.2);
}

.btn-primary:active {
	transform: translateY(0);
}

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

.btn-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ========================================
   Auth Footer
   ======================================== */

.auth-modal-footer {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	text-align: center;
}

.auth-modal-footer p {
	font-size: 14px;
	color: var(--text-secondary);
	margin: 8px 0;
}

.auth-modal-footer a {
	color: var(--olive);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.auth-modal-footer a:hover {
	color: var(--deep-forest);
	text-decoration: underline;
}

/* ========================================
   Auth Trigger Buttons
   ======================================== */

.auth-triggers {
	display: flex;
	align-items: center;
	gap: 12px;
}

.btn-auth {
	padding: 8px 16px;
	font-family: var(--font-heading);
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.btn-login {
	background: transparent;
	color: var(--deep-forest);
	border: 1px solid var(--border);
}

.btn-login:hover {
	border-color: var(--olive);
	background: var(--bg-section);
}

.btn-signup {
	background: var(--olive);
	color: var(--white);
	border: 1px solid var(--olive);
}

.btn-signup:hover {
	background: var(--deep-forest);
	border-color: var(--deep-forest);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(30, 59, 52, 0.15);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
	.auth-modal-content {
		padding: 32px 24px;
		width: 95%;
	}

	.auth-modal-header h2 {
		font-size: 24px;
	}
}
