/* UCAM Auth Popup — login/register modal shown when unauthenticated users click download */

.ucam-auth-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ucam-auth-popup[hidden] { display: none !important; }

.ucam-auth-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	cursor: pointer;
}

.ucam-auth-popup__box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 40px rgba(0,0,0,.25);
	width: min(460px, 94vw);
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px;
	z-index: 1;
}

.ucam-auth-popup__close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #777;
	line-height: 1;
}
.ucam-auth-popup__close:hover { color: #111; }

.ucam-auth-popup__header { margin-bottom: 20px; text-align: center; }
.ucam-auth-popup__header h2 { margin: 0 0 6px; font-size: 1.35rem; }
.ucam-auth-popup__header p { margin: 0; color: #555; font-size: .92rem; }

.ucam-auth-popup__tabs {
	display: flex;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 22px;
}
.ucam-auth-popup__tab {
	flex: 1;
	background: none;
	border: none;
	padding: 10px 0;
	font-size: .95rem;
	font-weight: 600;
	color: #555;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color .15s, border-color .15s;
}
.ucam-auth-popup__tab--active {
	color: #0073aa;
	border-bottom-color: #0073aa;
}

.ucam-auth-popup__pane { display: none; }
.ucam-auth-popup__pane--active { display: block; }

.ucam-form-field { margin-bottom: 16px; }
.ucam-form-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 5px; }
.ucam-form-field input[type="text"],
.ucam-form-field input[type="email"],
.ucam-form-field input[type="password"] {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: .95rem;
	box-sizing: border-box;
	transition: border-color .15s;
}
.ucam-form-field input:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}
.ucam-form-field--check label { display: flex; align-items: center; gap: 7px; font-weight: 400; }

.ucam-auth-popup__error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #b91c1c;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: .88rem;
	margin-bottom: 14px;
}

.ucam-auth-popup__submit {
	width: 100%;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, opacity .15s;
}
.ucam-auth-popup__submit:hover { background: #005d8c; }
.ucam-auth-popup__submit:disabled { opacity: .6; cursor: not-allowed; }

.ucam-auth-popup__meta {
	text-align: center;
	font-size: .83rem;
	color: #888;
	margin-top: 14px;
}
.ucam-auth-popup__terms a { color: #0073aa; }

@media (max-width: 480px) {
	.ucam-auth-popup__box { padding: 22px 16px; }
}
