/* Qly-quangcao Frontend – multi-slot + effects */

#qly-quangcao-wrapper {
	pointer-events: none;
}

.qly-ad {
	position: fixed;
	/* top set inline per slot */
	transform: translateY(-50%);
	z-index: 99990;
	width: var(--qly-ad-width, 160px);
	pointer-events: auto;
	display: none;
	opacity: 0;
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.qly-ad.qly-ad-visible {
	opacity: 1;
}

.qly-ad-left {
	left: var(--qly-side-margin, 15px);
}

.qly-ad-left.qly-ad-visible {
	transform: translateY(-50%) translateX(0);
}

.qly-ad-right {
	right: var(--qly-side-margin, 15px);
}

.qly-ad-right.qly-ad-visible {
	transform: translateY(-50%) translateX(0);
}

.qly-ad-link {
	display: block;
	line-height: 0;
	text-decoration: none;
	border: none;
	outline: none;
	color: inherit;
}

.qly-ad-inner {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	background: #fff;
}

.qly-ad-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: inherit;
	object-fit: contain;
	background: transparent;
	transition: transform 0.25s ease;
}

.qly-ad-link:hover .qly-ad-img {
	transform: scale(1.03);
}

/* Highlight text (phone number etc.) */
.qly-highlight {
	display: block;
	text-align: center;
	padding: 6px 4px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: #c0392b;
	background: #fff8e6;
	letter-spacing: 0.3px;
}

/* Shine effect – light sweep */
.qly-shine {
	display: none;
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(
		120deg,
		transparent 0%,
		rgba(255, 255, 255, 0.45) 50%,
		transparent 100%
	);
	pointer-events: none;
	z-index: 2;
}

.qly-fx-shine .qly-shine {
	display: block;
	animation: qly-shine-sweep 3s ease-in-out infinite;
}

@keyframes qly-shine-sweep {
	0%   { left: -75%; }
	40%  { left: 125%; }
	100% { left: 125%; }
}

/* Pulse effect */
.qly-fx-pulse .qly-ad-inner {
	animation: qly-pulse 2.2s ease-in-out infinite;
}

@keyframes qly-pulse {
	0%, 100% { transform: scale(1); box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
	50%      { transform: scale(1.04); box-shadow: 0 4px 18px rgba(0,0,0,0.22); }
}

/* Glow effect */
.qly-fx-glow .qly-ad-inner {
	animation: qly-glow 2.5s ease-in-out infinite;
}

@keyframes qly-glow {
	0%, 100% { box-shadow: 0 0 8px rgba(255, 200, 50, 0.35); }
	50%      { box-shadow: 0 0 20px rgba(255, 180, 0, 0.75); }
}

/* Highlight text pulses when effect is pulse or glow */
.qly-fx-pulse .qly-highlight,
.qly-fx-glow .qly-highlight {
	animation: qly-text-pulse 1.6s ease-in-out infinite;
}

@keyframes qly-text-pulse {
	0%, 100% { color: #c0392b; background: #fff8e6; }
	50%      { color: #e74c3c; background: #ffe082; }
}

@media (max-width: 1279px) {
	.qly-ad {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qly-fx-shine .qly-shine,
	.qly-fx-pulse .qly-ad-inner,
	.qly-fx-glow .qly-ad-inner,
	.qly-fx-pulse .qly-highlight,
	.qly-fx-glow .qly-highlight {
		animation: none !important;
	}
}
