/* Layout + chip baseline for the social-share / author-social-icons
 * blocks (#501). Reads the `--ap-social-*` custom properties stamped by
 * the renderers so theme colors, hover colors, and background colors
 * apply identically in the editor canvas and the front-end render.
 */

.ap-social-share-content,
.ap-author-social-icons {
	display: flex;
	gap: 0.5rem;
}

.ap-social-share-content--vertical,
.ap-author-social-icons--vertical {
	flex-direction: column;
	align-items: stretch;
}

.ap-social-share-content--horizontal,
.ap-author-social-icons--horizontal {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

.ap-social-share-content--full-width .ap-social-share-content__item,
.ap-author-social-icons--full-width .ap-author-social-icons__item {
	flex: 1 1 auto;
}

.ap-social-share-content--auto-width .ap-social-share-content__item,
.ap-author-social-icons--auto-width .ap-author-social-icons__item {
	flex: 0 0 auto;
}

.ap-social-share-content__chip,
.ap-author-social-icons__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem;
	text-decoration: none;
	color: var(--ap-social-color, currentcolor);
	background-color: var(--ap-social-bg, transparent);
	transition: color 150ms ease, background-color 150ms ease;
}

.ap-social-share-content--full-width .ap-social-share-content__chip,
.ap-author-social-icons--full-width .ap-author-social-icons__chip {
	width: 100%;
}

.ap-social-share-content__chip:hover,
.ap-social-share-content__chip:focus-visible,
.ap-author-social-icons__chip:hover,
.ap-author-social-icons__chip:focus-visible {
	color: var(--ap-social-hover-color, var(--ap-social-color, currentcolor));
	background-color: var(--ap-social-hover-bg, var(--ap-social-bg, transparent));
}

.ap-social-share-content__icon,
.ap-author-social-icons__icon {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	fill: currentcolor;
}

.ap-social-share-content__label,
.ap-author-social-icons__label {
	font-weight: 500;
}

.ap-social-share-content__empty,
.ap-author-social-icons__empty {
	margin: 0;
	padding: 0.5rem 0.75rem;
	color: #6b7280;
	font-size: 0.875rem;
	font-style: italic;
}

/* Copy-link chip (#963). The interactivity script swaps the fallback
 * `<a>` for a `<button>`; reset the UA button styles so both look the
 * same, and keep the live-region status visually hidden. */
button.ap-social-share-content__chip {
	margin: 0;
	border: 0;
	font: inherit;
	line-height: inherit;
	cursor: pointer;
}

.ap-social-share-content__status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Social Icons (#1023) — per-icon styles set on the parent. The `<ul>`
 * carries them as `--ap-social-links-*` properties, each switched on by a
 * `has-icon-*` class. Mirrors the editor's
 * `resources/js/visual-editor/blocks/social-links/social-links.css`.
 */

.wp-block-artisanpack-social-links .wp-social-link {
	transition: transform 0.1s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-artisanpack-social-links .wp-social-link {
		transition: none;
	}
}

.wp-block-artisanpack-social-links.has-icon-color .wp-social-link {
	color: var(--ap-social-links-color, currentcolor);
}

.wp-block-artisanpack-social-links.has-icon-background-color .wp-social-link {
	background-color: var(--ap-social-links-bg, transparent);
}

.wp-block-artisanpack-social-links.has-icon-border .wp-social-link {
	border-width: var(--ap-social-links-border-width, 1px);
	border-style: var(--ap-social-links-border-style, solid);
	border-color: var(--ap-social-links-border-color, currentcolor);
}

.wp-block-artisanpack-social-links.has-icon-border-radius .wp-social-link {
	border-radius: var(--ap-social-links-radius, 9999px);
}

.wp-block-artisanpack-social-links.has-icon-padding .wp-social-link .wp-block-social-link-anchor {
	padding: var(--ap-social-links-padding, 0.25em);
}

.wp-block-artisanpack-social-links.has-icon-hover-color .wp-social-link:is(:hover, :focus-within) {
	color: var(--ap-social-links-hover-color, currentcolor);
}

.wp-block-artisanpack-social-links.has-icon-hover-background-color .wp-social-link:is(:hover, :focus-within) {
	background-color: var(--ap-social-links-hover-bg, transparent);
}

.wp-block-artisanpack-social-links.has-icon-hover-border-color .wp-social-link:is(:hover, :focus-within) {
	border-color: var(--ap-social-links-hover-border-color, currentcolor);
}
