/**
 * XSocialShare - plg_content_xsocialshare
 * (C) 2026 JustJob Srl - Xenix - GPL-3.0-or-later
 *
 * Nessuna larghezza fissa: la barra si adatta a qualsiasi contenitore,
 * va a capo quando serve e non viene mai tagliata da un overflow.
 * I selettori sono deliberatamente a due livelli per prevalere sugli stili
 * generici dei template senza ricorrere a !important.
 */

.xss {
	--xss-gap: 0.5rem;
	--xss-btn: 2.75rem;
	--xss-icon: 1.15rem;
	--xss-brand: #333;
	--xss-mono: #1f2937;
	--xss-radius: 999px;

	margin: 1.75rem 0;
	clear: both;
	overflow: visible;
	max-width: 100%;
}

.xss .xss-heading {
	margin: 0 0 0.6rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	opacity: 0.75;
}

.xss .xss-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--xss-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.xss .xss-item {
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
}

.xss .xss-item::before,
.xss .xss-item::marker {
	content: none;
}

.xss .xss-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-width: var(--xss-btn);
	min-height: var(--xss-btn);
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--xss-radius);
	background-color: var(--xss-brand);
	background-image: none;
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 0.875rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.xss .xss-btn[hidden] {
	display: none;
}

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

.xss .xss-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.xss .xss-btn:active {
	transform: translateY(0);
}

.xss .xss-icon {
	width: var(--xss-icon);
	height: var(--xss-icon);
	flex: none;
	fill: currentColor;
	pointer-events: none;
}

/* Etichette: nascoste per impostazione predefinita, ma sempre leggibili dagli screen reader */
.xss .xss-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.xss-has-labels .xss-label {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: nowrap;
}

.xss-has-labels .xss-btn {
	padding: 0 1rem;
	border-radius: 0.5rem;
}

.xss-has-labels.xss-shape-circle .xss-btn {
	border-radius: var(--xss-radius);
}

/* Allineamento */
.xss-align-start .xss-list { justify-content: flex-start; }
.xss-align-center .xss-list { justify-content: center; }
.xss-align-end .xss-list { justify-content: flex-end; }
.xss-align-center .xss-heading { text-align: center; }
.xss-align-end .xss-heading { text-align: right; }

/* Forma */
.xss-shape-circle { --xss-radius: 999px; }
.xss-shape-rounded { --xss-radius: 0.55rem; }
.xss-shape-square { --xss-radius: 0; }

/* Dimensione */
.xss-size-sm { --xss-btn: 2.25rem; --xss-icon: 0.95rem; --xss-gap: 0.4rem; }
.xss-size-md { --xss-btn: 2.75rem; --xss-icon: 1.15rem; }
.xss-size-lg { --xss-btn: 3.25rem; --xss-icon: 1.4rem; --xss-gap: 0.65rem; }

/* Varianti di colore */
.xss-style-mono .xss-btn {
	background-color: var(--xss-mono);
}

.xss-style-outline .xss-btn {
	background-color: transparent;
	border-color: var(--xss-mono);
	color: var(--xss-mono);
}

.xss-style-outline .xss-btn:hover,
.xss-style-outline .xss-btn:focus-visible {
	background-color: var(--xss-mono);
	color: #fff;
}

/* Messaggio di conferma della copia */
.xss .xss-feedback {
	display: block;
	margin-top: 0.5rem;
	min-height: 1.2em;
	font-size: 0.8125rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.xss-align-center .xss-feedback { text-align: center; }
.xss-align-end .xss-feedback { text-align: right; }

.xss .xss-feedback.is-visible {
	opacity: 0.8;
}

/* Schermi stretti: con le etichette attive i pulsanti diventano una colonna */
@media (max-width: 480px) {
	.xss-has-labels .xss-list {
		flex-direction: column;
		align-items: stretch;
	}

	.xss-has-labels .xss-btn {
		width: 100%;
		justify-content: flex-start;
		padding: 0 1.1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xss .xss-btn,
	.xss .xss-feedback {
		transition: none;
	}

	.xss .xss-btn:hover,
	.xss .xss-btn:focus-visible {
		transform: none;
	}
}

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