/* Catfish — dải banner đáy màn hình, nhiều banner xếp cạnh nhau */
.pfhd-ads-catfish {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	z-index: 99999;
	max-width: 960px;
	width: 100%;
	background: #1b1e2b;
	border: 1px solid #2a2d3d;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, .4);
	padding: 6px;
	box-sizing: border-box;
}
.pfhd-ads-catfish-items {
	display: flex;
	gap: 6px;
	align-items: center;
}
.pfhd-ads-catfish-item {
	flex: 1 1 0;
	min-width: 0;
	display: block;
	line-height: 0;
}
.pfhd-ads-catfish-item img {
	width: 100%;
	height: auto;
	max-height: 100px;
	object-fit: contain;
	border-radius: 4px;
	display: block;
}
.pfhd-ads-catfish-close {
	position: absolute;
	top: -14px;
	right: 6px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e53e3e;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
	z-index: 1;
}
@media (max-width: 480px) {
	.pfhd-ads-catfish {
		border-radius: 0;
	}
	.pfhd-ads-catfish-items {
		flex-direction: column;
		max-height: 40vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.pfhd-ads-catfish-item {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* Banner trong bài — trên đầu / dưới cuối nội dung. Ảnh giữ đúng kích thước gốc
   (không kéo giãn lấp đầy chiều rộng bài viết), cả khối canh giữa. */
.pfhd-ads-inline-banners {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin: 20px 0;
}
.pfhd-ads-inline-item {
	display: block;
	line-height: 0;
	max-width: 100%;
}
.pfhd-ads-inline-item img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
	margin: 0 auto;
}

/* Popup — overlay giữa màn hình. z-index cao hơn catfish (99999) để luôn nổi trên cùng. */
.pfhd-ads-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .75);
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 30px 16px;
	box-sizing: border-box;
}
.pfhd-ads-popup-overlay.is-visible {
	display: flex;
}
.pfhd-ads-popup-content {
	position: relative;
	max-width: 500px;
	width: 100%;
}
.pfhd-ads-popup-content img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}
.pfhd-ads-popup-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e53e3e;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
	z-index: 1;
}
@media (max-width: 480px) {
	.pfhd-ads-popup-close {
		top: -10px;
		right: 0;
	}
}

/* TVC pre-roll — đè lên khung player (.pfhd-player của theme), gỡ ra khi hết quảng cáo.
   .pfhd-player vốn không có position, phải set relative để overlay position:absolute đúng chỗ. */
.pfhd-player {
	position: relative;
}
.pfhd-ads-tvc-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: inherit;
}
.pfhd-ads-tvc-video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}
.pfhd-ads-tvc-skip {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	border: 2px solid #fff;
	border-radius: 5px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 700;
	cursor: not-allowed;
	opacity: .6;
	z-index: 2;
	transition: opacity .2s, background .2s;
}
.pfhd-ads-tvc-skip.is-active {
	cursor: pointer;
	opacity: 1;
	background: rgba(229, 62, 62, .9);
}
.pfhd-ads-tvc-cta {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 30px;
	padding: 10px 24px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 4px 15px rgba(0, 0, 0, .4);
}
