/* ==========================================================================
   AT — Bài viết bảo vệ (đăng nhập + mật khẩu bài viết)
   ========================================================================== */

.at-pp-gate {
	--at-pp-brand: #e04f16;
	--at-pp-brand-dark: #b93815;
	--at-pp-text: #181d27;
	--at-pp-text-muted: #535862;
	--at-pp-border: #d5d7da;

	max-width: 560px;
	margin: 48px auto;
	padding: 40px 32px;
	border: 1px solid #e9eaeb;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
	text-align: center;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--at-pp-text);
	box-sizing: border-box;
}

.at-pp-gate *,
.at-pp-gate *::before,
.at-pp-gate *::after {
	box-sizing: border-box;
}

.at-pp-gate__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 20px;
	border: 8px solid #fef6ee;
	border-radius: 9999px;
	background: #fdead7;
	color: var(--at-pp-brand);
}

.at-pp-gate .at-pp-gate__title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 600;
	color: var(--at-pp-text);
}

.at-pp-gate__text {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 24px;
	color: var(--at-pp-text-muted);
}

.at-pp-gate__hint {
	margin: -12px 0 20px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fafafa;
	font-size: 14px;
	line-height: 20px;
	color: var(--at-pp-text-muted);
}

.at-pp-gate__error {
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 1px solid #fecdca;
	border-radius: 8px;
	background: #fef3f2;
	font-size: 14px;
	line-height: 20px;
	color: #b42318;
}

.at-pp-gate__actions,
.at-pp-gate__form {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0;
}

.at-pp-gate .at-pp-gate__input {
	flex: 1 1 240px;
	height: 44px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--at-pp-border);
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
	font-size: 16px;
	color: var(--at-pp-text);
}

.at-pp-gate .at-pp-gate__input:focus {
	border-color: var(--at-pp-brand);
	outline: none;
	box-shadow: 0 0 0 4px rgba(224, 79, 22, 0.15);
}

.at-pp-gate .at-pp-gate__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.at-pp-gate .at-pp-gate__btn--primary {
	background: var(--at-pp-brand);
	border-color: var(--at-pp-brand);
	color: #ffffff;
}

.at-pp-gate .at-pp-gate__btn--primary:hover,
.at-pp-gate .at-pp-gate__btn--primary:focus {
	background: var(--at-pp-brand-dark);
	border-color: var(--at-pp-brand-dark);
	color: #ffffff;
}

.at-pp-gate .at-pp-gate__btn--secondary {
	background: #ffffff;
	border-color: var(--at-pp-border);
	color: #414651;
}

.at-pp-gate .at-pp-gate__btn--secondary:hover,
.at-pp-gate .at-pp-gate__btn--secondary:focus {
	background: #fafafa;
	color: var(--at-pp-text);
}

@media (max-width: 549px) {
	.at-pp-gate {
		margin: 24px auto;
		padding: 32px 20px;
	}

	.at-pp-gate__actions,
	.at-pp-gate__form {
		flex-direction: column;
	}

	.at-pp-gate .at-pp-gate__input,
	.at-pp-gate .at-pp-gate__btn {
		flex: none;
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Bài bị khóa: cổng đè lên banner (làm mờ) — thấy ngay màn hình đầu
   -------------------------------------------------------------------------- */

.at-blog-hero--locked {
	padding-top: 24px;
	padding-bottom: 24px;
}

.at-blog-hero--locked .at-blog-hero__image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: auto;
	min-height: 460px;
	padding: 32px 16px;
	line-height: normal;
	isolation: isolate;
}

.at-blog-hero--locked .at-blog-hero__image .at-blog-hero__img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(16px) saturate(1.1);
	transform: scale(1.1); /* che viền mờ trong suốt do blur ở mép ảnh */
	pointer-events: none;
	user-select: none;
}

.at-blog-hero--locked .at-blog-hero__image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(24, 29, 39, 0.28);
}

.at-blog-hero__gate {
	position: relative;
	z-index: 2;
	width: 100%;
}

/* Ảnh trong cổng (logo nút SSO) không ăn style `.at-blog-hero__image img` của banner. */
.at-blog-hero__image .at-blog-hero__gate img {
	position: static;
	display: inline-block;
	width: 26px;
	height: auto;
	object-fit: contain;
	filter: none;
	transform: none;
}

.at-blog-hero__gate .at-pp-gate {
	margin: 0 auto;
	padding: 32px;
	box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.18), 0 8px 8px -4px rgba(16, 24, 40, 0.06);
}

@media (max-width: 849px) {
	.at-blog-hero--locked {
		padding-top: 16px;
		padding-bottom: 16px;
	}

	.at-blog-hero--locked .at-blog-hero__image {
		min-height: 0;
		padding: 24px 12px;
	}
}

@media (max-width: 549px) {
	.at-blog-hero__gate .at-pp-gate {
		padding: 24px 16px;
	}

	.at-blog-hero__gate .at-pp-gate__icon {
		width: 48px;
		height: 48px;
		margin-bottom: 12px;
	}

	.at-blog-hero__gate .at-pp-gate__text {
		margin-bottom: 16px;
		font-size: 15px;
		line-height: 22px;
	}
}
