/**
 * My Audiobook — Affiliate CTA Styles
 *
 * Styles for the multi-country affiliate CTA blocks.
 * These complement the inline styles in the PHP pattern.
 *
 * @package hoerbuchdaily
 * @version 1.0.0
 */

/* ─── CTA Container ─── */
.hbd-affiliate-cta {
	position: relative;
	overflow: hidden;
}

.hbd-affiliate-cta::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #7C3AED 0%, #D4A64B 50%, #7C3AED 100%);
	border-radius: 8px 8px 0 0;
}

/* ─── Button Hover Effects ─── */
.hbd-affiliate-cta a[rel*="sponsored"] {
	transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	overflow: hidden;
}

.hbd-affiliate-cta a[rel*="sponsored"]:hover {
	opacity: 0.85;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hbd-affiliate-cta a[rel*="sponsored"]:active {
	transform: translateY(0);
	box-shadow: none;
}

/* ─── Pulse Animation for Primary (FR) Button ─── */
.hbd-affiliate-cta a[rel*="sponsored"][style*="background:#7C3AED"],
.hbd-affiliate-cta a[rel*="sponsored"][style*="background-color:#7C3AED"] {
	animation: hbd-pulse-subtle 3s ease-in-out infinite;
}

@keyframes hbd-pulse-subtle {
	0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.3); }
	50% { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0); }
}

/* ─── Disclosure Text ─── */
.hbd-affiliate-cta p[style*="font-style:italic"] {
	opacity: 0.7;
	transition: opacity 0.2s;
}

.hbd-affiliate-cta:hover p[style*="font-style:italic"] {
	opacity: 1;
}

/* ─── Country-Highlighted Button (added by JS) ─── */
.hbd-affiliate-cta a[data-hbd-affiliate][style*="order: -1"] {
	box-shadow: 0 0 0 2px #D4A64B;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
	.hbd-affiliate-cta {
		padding: 1.5rem 1rem !important;
	}

	.hbd-affiliate-cta a[rel*="sponsored"] {
		font-size: 0.85rem !important;
		padding: 0.6rem 0.9rem !important;
		flex: 1 1 calc(50% - 0.5rem);
		text-align: center;
		min-width: 0;
	}

	.hbd-affiliate-cta h3 {
		font-size: 1.25rem !important;
	}
}

@media (max-width: 380px) {
	.hbd-affiliate-cta a[rel*="sponsored"] {
		flex: 1 1 100%;
	}
}

/* ─── Print: Hide affiliate CTAs ─── */
@media print {
	.hbd-affiliate-cta {
		display: none !important;
	}
}
