/**
 * Share-from-the-image button + toast. Extracted from the owensboro-times
 * theme so it's self-contained on any theme. Colors use theme CSS
 * variables with hard fallbacks, so it looks right on the FSE theme and
 * still works on a classic theme that doesn't define them.
 *
 * The reveal-on-hover keys off `.ot-share-host` (the element the button is
 * injected into) rather than a theme-specific card class, so no theme
 * coupling: hovering any host reveals its button.
 */
.ot-share-host {
	position: relative;
}

.ot-share {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 4;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: rgba(20, 22, 26, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.ot-share-host:hover .ot-share,
.ot-share:focus-visible {
	opacity: 1;
	transform: none;
}

.ot-share:hover {
	background: var(--wp--preset--color--brand, #0aa3dc);
}

/* Touch devices have no hover state - keep the share affordance visible. */
@media (hover: none) {
	.ot-share {
		opacity: 1;
		transform: none;
	}
}

.ot-share-toast {
	position: fixed;
	left: 50%;
	bottom: 2rem;
	transform: translate(-50%, 1rem);
	background: var(--wp--preset--color--contrast, #14161a);
	color: #fff;
	padding: 0.7rem 1.15rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.ot-share-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}
