/**
 * Social Share Buttons
 *
 * Styles of the share bar shown on a collection ( share url buttons, share via
 * email and copy link ).
 *
 * The rules are scoped to .woocl-social-buttons and every property which the
 * layout depends on is declared, so the buttons keep their shape on the themes
 * which reset links, buttons or inline svg icons.
 *
 * Override this stylesheet by copying it to
 * yourtheme/woocommerce/woocommerce-collections/css/woo-cll-social-share.css
 *
 * @package WPWeb WooCommerce Collections
 * @since 1.0.8
 */

/* ------------------------------------------------------------------------- *
 * Share bar
 * ------------------------------------------------------------------------- */
.woocl-social-buttons {
	display: block;
	width: 100%;
	clear: both;
	margin: 0 0 15px;
}
.woocl-social-buttons .woocl-social-sub-btn {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-end;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* every button sits in the flex row, the legacy float is not used any more */
.woocl-social-buttons .woocl-share-button,
.woocl-social-buttons .woocl-email,
.woocl-social-buttons .woocl-email-button {
	display: flex;
	float: none;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	line-height: normal;
}
.woocl-social-buttons .woocl-email-button {
	width: 100%;
}

/* ------------------------------------------------------------------------- *
 * Button
 * ------------------------------------------------------------------------- */
.woocl-social-buttons a.woocl-share-link,
.woocl-social-buttons .woocl-share-button a.woocl-share-link,
.woocl-social-buttons .woocl-email-button a.woocl-share-link {
	--woocl-share-color: #5f6b7a;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	width: 100%;
	min-height: 36px;
	margin: 0;
	padding: 7px 12px;
	border: 1px solid rgba( 0, 0, 0, .12 );
	border-radius: 4px;
	background: #fff;
	color: #3c434a;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.woocl-social-buttons a.woocl-share-link:hover,
.woocl-social-buttons a.woocl-share-link:focus,
.woocl-social-buttons a.woocl-share-link.woocl-share-copied {
	background: var( --woocl-share-color );
	border-color: var( --woocl-share-color );
	color: #fff;
	text-decoration: none;
	box-shadow: none;
}
.woocl-social-buttons a.woocl-share-link:focus-visible {
	outline: 2px solid var( --woocl-share-color );
	outline-offset: 2px;
}

/* the icons are inline svg, so the size is pinned against the theme resets */
.woocl-social-buttons a.woocl-share-link .woocl-share-icon,
.woocl-social-buttons svg.woocl-share-icon {
	display: block;
	width: 16px;
	height: 16px;
	min-width: 16px;
	max-width: 16px;
	flex: 0 0 16px;
	color: var( --woocl-share-color );
	vertical-align: middle;
	transition: color .15s ease;
}
.woocl-social-buttons a.woocl-share-link:hover .woocl-share-icon,
.woocl-social-buttons a.woocl-share-link:focus .woocl-share-icon,
.woocl-social-buttons a.woocl-share-link.woocl-share-copied .woocl-share-icon {
	color: #fff;
}
.woocl-social-buttons .woocl-btn-label {
	display: inline-block;
	font: inherit;
	color: inherit;
}

/* ------------------------------------------------------------------------- *
 * Tablet
 * ------------------------------------------------------------------------- */
@media screen and ( max-width: 991px ) {

	.woocl-social-buttons .woocl-social-sub-btn {
		justify-content: flex-start;
	}
}

/* ------------------------------------------------------------------------- *
 * Phone
 *
 * The labels stay in the markup for the screen readers, the buttons become
 * icon only so that a full share bar fits on a small screen without wrapping
 * into a stack of half empty rows.
 * ------------------------------------------------------------------------- */
@media screen and ( max-width: 600px ) {

	.woocl-social-buttons .woocl-social-sub-btn {
		gap: 10px;
	}
	.woocl-social-buttons a.woocl-share-link,
	.woocl-social-buttons .woocl-share-button a.woocl-share-link,
	.woocl-social-buttons .woocl-email-button a.woocl-share-link {
		width: 42px;
		min-width: 42px;
		height: 42px;
		min-height: 42px;
		padding: 0;
		border-radius: 50%;
		gap: 0;
	}
	.woocl-social-buttons a.woocl-share-link .woocl-share-icon,
	.woocl-social-buttons svg.woocl-share-icon {
		width: 18px;
		height: 18px;
		min-width: 18px;
		max-width: 18px;
		flex: 0 0 18px;
	}
	/* keep the label readable by assistive technology only */
	.woocl-social-buttons .woocl-btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect( 1px, 1px, 1px, 1px );
		clip-path: inset( 50% );
		white-space: nowrap;
		border: 0;
	}
	.woocl-social-buttons .woocl-email-button {
		width: auto;
	}
}

/* comfortable targets on the devices which are used with a finger */
@media ( pointer: coarse ) {

	.woocl-social-buttons a.woocl-share-link {
		min-height: 42px;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.woocl-social-buttons a.woocl-share-link,
	.woocl-social-buttons .woocl-share-icon {
		transition: none;
	}
}
