/* plg_content_socialshare - "Fine ring" share buttons.
   Colours follow the template when it defines --doo-s-color-* (Dooblisys templates) and fall back to the same palette. */
.spshare {
	--sps-primary: var(--doo-s-color-primary, #4066aa);
	--sps-accent: var(--doo-s-color-secondary, #d7a037);
	--sps-line: var(--doo-s-color-highlight, #e3c68e);
	--sps-tip: #1f2d3d; /* same dark box as the template's menu tooltips */
	/* Space below the block = space between the article title and the publication date in the
	   Dooblisys template (title padding-bottom 32px + margin-bottom 15px). Override it if your template differs. */
	--sps-gap-below: 47px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	margin: 1rem 0 var(--sps-gap-below);
	font-family: inherit;
}

/* Heading: small label between two fine lines */
.spshare__title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	color: var(--sps-accent);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.spshare__title::before,
.spshare__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--sps-line);
}

.spshare__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.spshare__list > li {
	margin: 0;
	padding: 0;
}

/* Round ring button */
.spshare__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border: 1.5px solid var(--sps-primary);
	border-radius: 50%;
	background: transparent;
	color: var(--sps-primary);
	font-size: 1.1rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.spshare__btn:hover,
.spshare__btn:focus-visible {
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
}

.spshare__btn:focus-visible {
	outline: 2px solid var(--sps-accent);
	outline-offset: 3px;
}

/* The name stays in the page for screen readers; it is shown as a tooltip instead */
.spshare__t {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Tooltip: identical to the template's top-menu tooltip (box, arrow, type, fade).
   The extra 1.5px accounts for the ring's border (the menu links have none). */
.spshare__btn::after {
	content: attr(data-label);
	position: absolute;
	top: calc(100% + 1.5px);
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	z-index: 20;
	padding: 7px 10px;
	border-radius: 0.25rem;
	background: var(--sps-tip);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.spshare__btn::before {
	content: "";
	position: absolute;
	top: calc(100% + 1.5px);
	left: 50%;
	transform: translateX(-50%) translateY(1px);
	z-index: 20;
	border: 5px solid transparent;
	border-bottom-color: var(--sps-tip);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.spshare__btn:hover::after,
.spshare__btn:hover::before,
.spshare__btn:focus-visible::after,
.spshare__btn:focus-visible::before {
	opacity: 1;
	visibility: visible;
}

.spshare--notips .spshare__btn::after,
.spshare--notips .spshare__btn::before {
	display: none;
}

/* Each network fills with its own colour on hover */
.spshare__btn--linkedin:hover,
.spshare__btn--linkedin:focus-visible { background: #0a66c2; border-color: #0a66c2; }
.spshare__btn--facebook:hover,
.spshare__btn--facebook:focus-visible { background: #1877f2; border-color: #1877f2; }
.spshare__btn--x:hover,
.spshare__btn--x:focus-visible { background: #111; border-color: #111; }
.spshare__btn--bluesky:hover,
.spshare__btn--bluesky:focus-visible { background: #1185fe; border-color: #1185fe; }
.spshare__btn--whatsapp:hover,
.spshare__btn--whatsapp:focus-visible { background: #1faa59; border-color: #1faa59; }
.spshare__btn--email:hover,
.spshare__btn--email:focus-visible { background: var(--sps-accent); border-color: var(--sps-accent); }
.spshare__btn--copy:hover,
.spshare__btn--copy:focus-visible { background: var(--sps-primary); border-color: var(--sps-primary); }

/* "Link copied" confirmation */
.spshare__btn--copy.is-copied {
	background: var(--sps-primary);
	color: #fff;
}

.spshare__btn--copy.is-copied::after,
.spshare__btn--copy.is-copied::before {
	opacity: 1;
	visibility: visible;
}

@media (max-width: 575.98px) {
	.spshare__list { gap: 0.5rem; }
	.spshare__btn { width: 2.5rem; height: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.spshare__btn,
	.spshare__btn::after,
	.spshare__btn::before { transition: none; }
	.spshare__btn:hover,
	.spshare__btn:focus-visible { transform: none; }
}

@media print {
	.spshare { display: none; }
}
