/**
 * Social Share Bar
 *
 * Theme-agnostic styling using currentColor and inherited values
 * so it works regardless of how a theme names its WP preset colors.
 *
 * @package add
 */

.add-share-bar {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid currentColor;
	opacity: 0.75;
}

.add-share-bar:hover {
	opacity: 1;
}

.add-share-bar__heading {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 1rem;
	color: inherit;
	opacity: 0.6;
}

.add-share-bar__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.add-share-bar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.875rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1;
	color: inherit;
	background: transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	font-family: inherit;
}

.add-share-bar__link:hover,
.add-share-bar__link:focus-visible {
	background: currentColor;
}

.add-share-bar__link:hover > *,
.add-share-bar__link:focus-visible > * {
	filter: invert(1);
}

.add-share-bar__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.add-share-bar__link svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .add-share-bar {
	border-top-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .add-share-bar__link {
	border-color: rgba(255, 255, 255, 0.25);
}

/* Copy-link success state */
.add-share-bar__link--copy[data-copied="true"] {
	border-color: #16a34a;
	color: #16a34a;
}

.add-share-bar__link--copy[data-copied="true"]:hover {
	background: #16a34a;
	color: #fff;
}

/* Responsive: stack on narrow viewports */
@media (max-width: 480px) {
	.add-share-bar__links {
		gap: 0.375rem;
	}

	.add-share-bar__link {
		padding: 0.4rem 0.625rem;
		font-size: 0.75rem;
	}

	.add-share-bar__label {
		display: none;
	}

	.add-share-bar__link svg {
		width: 18px;
		height: 18px;
	}
}
