/* ── EACMFS Login Modal ─────────────────────────────────── */

.login-modal {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.login-modal[hidden] {
	display: none !important;
}

/* Backdrop */
.login-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* Dialog */
.login-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: #122240;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 0.75rem;
	box-shadow:
		0 1.5rem 4rem rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset;
	animation: loginModalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

@keyframes loginModalIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(0.75rem);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Close button */
.login-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	background: rgba(255, 255, 255, 0.06);
	border: none;
	border-radius: 50%;
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	transition: background 0.2s, color 0.2s;
}

.login-modal__close:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.login-modal__close .material-symbols-rounded {
	font-size: 1.25rem;
}

/* Header */
.login-modal__header {
	text-align: center;
	padding: 2.5rem 2rem 0.5rem;
}

.login-modal__icon {
	font-size: 2.5rem;
	color: #4a7bc8;
	display: block;
	margin-bottom: 0.75rem;
}

.login-modal__title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.25rem;
	letter-spacing: -0.01em;
}

.login-modal__subtitle {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.45);
	margin: 0;
}

/* Form */
.login-modal__form {
	padding: 1.5rem 2rem 1rem;
}

.login-modal__field {
	margin-bottom: 1rem;
}

.login-modal__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 0.35rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.login-modal__input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0.5rem;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.login-modal__input-wrap:focus-within {
	border-color: #4a7bc8;
	box-shadow: 0 0 0 3px rgba(74, 123, 200, 0.15);
}

.login-modal__input-wrap .material-symbols-rounded {
	font-size: 1.2rem;
	color: rgba(255, 255, 255, 0.25);
	margin-left: 0.85rem;
	flex-shrink: 0;
}

.login-modal__input {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	color: #fff;
	font-size: 0.95rem;
	padding: 0.7rem 0.85rem;
	font-family: inherit;
	width: 100%;
}

.login-modal__input::placeholder {
	color: rgba(255, 255, 255, 0.2);
}

/* Remember me */
.login-modal__remember {
	margin-bottom: 1.25rem;
}

.login-modal__checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	user-select: none;
}

.login-modal__checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.login-modal__checkmark {
	width: 1.1rem;
	height: 1.1rem;
	border: 1.5px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.25rem;
	background: rgba(255, 255, 255, 0.04);
	flex-shrink: 0;
	position: relative;
	transition: background 0.2s, border-color 0.2s;
}

.login-modal__checkbox:checked + .login-modal__checkmark {
	background: #365FA6;
	border-color: #4a7bc8;
}

.login-modal__checkbox:checked + .login-modal__checkmark::after {
	content: '';
	position: absolute;
	top: 0.15rem;
	left: 0.35rem;
	width: 0.3rem;
	height: 0.55rem;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.login-modal__checkbox:focus-visible + .login-modal__checkmark {
	box-shadow: 0 0 0 3px rgba(74, 123, 200, 0.25);
}

/* Message */
.login-modal__message {
	padding: 0.65rem 0.85rem;
	border-radius: 0.5rem;
	font-size: 0.85rem;
	margin-bottom: 1rem;
	line-height: 1.4;
}

.login-modal__message[hidden] {
	display: none;
}

.login-modal__message--error {
	background: rgba(231, 76, 60, 0.12);
	border: 1px solid rgba(231, 76, 60, 0.25);
	color: #f1998e;
}

.login-modal__message--success {
	background: rgba(46, 204, 113, 0.12);
	border: 1px solid rgba(46, 204, 113, 0.25);
	color: #7debb5;
}

/* Submit button */
.login-modal__submit {
	width: 100%;
	padding: 0.75rem;
	background: #365FA6;
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.login-modal__submit:hover {
	background: #4a7bc8;
}

.login-modal__submit:active {
	background: #2a4d8a;
}

.login-modal__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Spinner */
.login-modal__spinner {
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: loginSpin 0.6s linear infinite;
}

.login-modal__spinner[hidden] {
	display: none;
}

@keyframes loginSpin {
	to { transform: rotate(360deg); }
}

/* Footer */
.login-modal__footer {
	text-align: center;
	padding: 0 2rem 1.5rem;
}

.login-modal__footer p {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.2);
	margin: 0;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ── Content Lock Overlay ───────────────────────────────── */

.eacmfs-lock {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
	border-radius: inherit;
	transition: background 0.25s;
}

.eacmfs-lock:hover {
	background: rgba(0, 0, 0, 0.65);
}

.eacmfs-lock__icon {
	font-size: 2.5rem;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 0.5rem;
	transition: color 0.25s, transform 0.25s;
}

.eacmfs-lock:hover .eacmfs-lock__icon {
	color: #4a7bc8;
	transform: scale(1.1);
}

.eacmfs-lock__text {
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.eacmfs-lock__sub {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.4);
	margin-top: 0.25rem;
}

/* Lock badge on session cards */
.session-card__lock {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 5;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.session-card__lock .material-symbols-rounded {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.7);
}

/* Lock overlay on session player (single-session.php) */
.session-player__lock {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	cursor: pointer;
	text-align: center;
	padding: 2rem;
}

.session-player__lock-icon {
	font-size: 4rem;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 1rem;
	transition: color 0.25s, transform 0.25s;
}

.session-player__lock:hover .session-player__lock-icon {
	color: #4a7bc8;
	transform: scale(1.1);
}

.session-player__lock-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.35rem;
}

.session-player__lock-sub {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.5);
	margin: 0 0 1.25rem;
}

.session-player__lock-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1.5rem;
	background: #365FA6;
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	font-size: 0.95rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s;
}

.session-player__lock-btn:hover {
	background: #4a7bc8;
}

/* Association page lock overlay — fills the 16:9 container */
.assoc-video .eacmfs-lock {
	position: absolute;
	border-radius: 0;
}

/* Hero lock state */
.hero__actions .btn--locked {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__actions .btn--locked:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 480px) {
	.login-modal__dialog {
		max-width: none;
		border-radius: 0.75rem 0.75rem 0 0;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		animation: loginModalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	@keyframes loginModalSlideUp {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.login-modal__header {
		padding: 2rem 1.5rem 0.5rem;
	}

	.login-modal__form {
		padding: 1.25rem 1.5rem 0.75rem;
	}

	.login-modal__footer {
		padding: 0 1.5rem 1.5rem;
	}
}
