/*
 * Styles for markup the plugin itself emits.
 *
 * Scoped tightly and written against theme custom properties with hard
 * fallbacks, so the disclosure still reads as deliberate under any theme —
 * including the default one, if ours is ever deactivated.
 *
 * Documented in docs/04-plugins.md.
 */

.horizonlume-disclosure {
	margin: 0 0 2rem;
	padding: 0.9rem 1.1rem;
	border-left: 3px solid var(--wp--preset--color--accent, #8a6a4b);
	background: var(--wp--preset--color--surface, rgba(0, 0, 0, 0.03));
	border-radius: 2px;
	font-size: 0.85rem;
	line-height: 1.55;
}

.horizonlume-disclosure p {
	margin: 0;
	color: var(--wp--preset--color--muted, #5b5b55);
}

.horizonlume-ad-marker {
	margin-inline-start: 0.15em;
	font-size: 0.7em;
	line-height: 1;
	vertical-align: super;
	color: var(--wp--preset--color--muted, #5b5b55);
	cursor: help;
	text-decoration: none;
}

.horizonlume-affiliate-link {
	/* Affiliate links should not be visually indistinguishable from editorial
	   links, but they should not be shouty either. A slightly different
	   underline is enough to be honest without breaking the reading rhythm. */
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	text-decoration-style: dotted;
}

/* Accessible text that is available to screen readers but not shown visually.
   Defined here rather than assumed from the theme, so the "(advertising link)"
   announcement survives a theme change. */
.horizonlume-disclosure .screen-reader-text,
.horizonlume-ad-marker .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-color-scheme: dark) {
	.horizonlume-disclosure {
		background: rgba(255, 255, 255, 0.04);
	}
}

/* --- Share links -------------------------------------------------------- */

.horizonlume-share {
	margin: 3rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--surface, rgba(0, 0, 0, 0.1));
}

.horizonlume-share__title {
	margin: 0 0 0.75rem;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.6;
}

.horizonlume-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.horizonlume-share__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--wp--preset--color--surface, rgba(0, 0, 0, 0.15));
	border-radius: 2px;
	font-size: 0.8rem;
	line-height: 1;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.horizonlume-share__link:hover,
.horizonlume-share__link:focus-visible {
	background: var(--wp--preset--color--surface, rgba(0, 0, 0, 0.05));
	border-color: var(--wp--preset--color--accent, #8a6a4b);
}

.horizonlume-share__icon {
	flex: none;
}

/* --- Related posts ------------------------------------------------------ */

.horizonlume-related {
	margin: 3rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--surface, rgba(0, 0, 0, 0.1));
}

.horizonlume-related__heading {
	margin: 0 0 1.25rem;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.6;
}

.horizonlume-related__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* One column on phones — most Pinterest traffic arrives on a narrow screen,
   and three cramped thumbnails read as clutter rather than as choices. */
@media (max-width: 600px) {
	.horizonlume-related__list {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
}

.horizonlume-related__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.horizonlume-related__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 2px;
	margin-bottom: 0.6rem;
}

.horizonlume-related__title {
	display: block;
	font-size: 0.95rem;
	line-height: 1.35;
}

.horizonlume-related__link:hover .horizonlume-related__title,
.horizonlume-related__link:focus-visible .horizonlume-related__title {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
