/**
 * Lookit Share Row
 *
 * Self-contained. Elementor only enqueues its share-button stylesheet when its
 * own widget is present on the page, so a shortcode replacement cannot inherit
 * it. Everything the row needs lives here.
 *
 * Tune from the shortcode via size, gap, bg, icon_color, shape and color
 * attributes, which write the custom properties below.
 */

.lookit-share-row {
	--lsr-size: 44px;
	--lsr-gap: 10px;
	--lsr-radius: 50%;
	--lsr-icon-scale: 0.42;
	--lsr-bg: #1c2b4a;
	--lsr-fg: #ffffff;
	--lsr-teal: #028673;

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

.lookit-share-row--nowrap {
	flex-wrap: nowrap;
}

.lookit-share-row--align-center {
	justify-content: center;
}

.lookit-share-row--align-right {
	justify-content: flex-end;
}

/* Elementor's grid item wrapper is kept for markup parity but carries no layout. */
.lookit-share-row .elementor-grid-item {
	display: block;
	margin: 0;
	padding: 0;
	width: auto;
}

.lookit-share-row .elementor-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: var(--lsr-size);
	height: var(--lsr-size);
	padding: 0;
	border: 0;
	border-radius: var(--lsr-radius);
	background-color: var(--lsr-bg);
	color: var(--lsr-fg);
	font-size: calc(var(--lsr-size) * var(--lsr-icon-scale));
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: filter 150ms ease, background-color 150ms ease;
}

.lookit-share-row .elementor-share-btn:hover,
.lookit-share-row .elementor-share-btn:focus {
	color: var(--lsr-fg);
	text-decoration: none;
	filter: brightness(1.18);
}

.lookit-share-row .elementor-share-btn:focus-visible {
	outline: 3px solid var(--lsr-teal);
	outline-offset: 2px;
}

.lookit-share-row .elementor-share-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.lookit-share-row .elementor-share-btn__icon i {
	font-size: inherit;
	line-height: 1;
}

.lookit-share-row__svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	display: block;
}

/* ---------------------------------------------------------------------------
 * Views
 * ------------------------------------------------------------------------ */

/* Icon only. The accessible name comes from aria-label on the anchor, so the
   visible label can be removed outright rather than hidden off-screen. */
.lookit-share-row--view-icon .elementor-share-btn__text {
	display: none;
}

.lookit-share-row--view-icon-text .elementor-share-btn,
.lookit-share-row--view-text .elementor-share-btn {
	width: auto;
	min-width: var(--lsr-size);
	padding: 0 16px;
	border-radius: calc(var(--lsr-size) / 2);
	font-size: 0.875rem;
	font-weight: 500;
}

.lookit-share-row--view-text .elementor-share-btn__icon {
	display: none;
}

.lookit-share-row .elementor-share-btn__title {
	white-space: nowrap;
}

/* ---------------------------------------------------------------------------
 * Shapes
 * ------------------------------------------------------------------------ */

.lookit-share-row--shape-square {
	--lsr-radius: 0;
}

.lookit-share-row--shape-rounded {
	--lsr-radius: 6px;
}

/* No pill at all: bare glyphs in the page's own colour. */
.lookit-share-row--shape-bare .elementor-share-btn {
	width: auto;
	height: auto;
	background: none;
	border-radius: 0;
	color: var(--lsr-bg);
	font-size: calc(var(--lsr-size) * var(--lsr-icon-scale) * 1.2);
}

.lookit-share-row--shape-bare {
	--lsr-gap: 18px;
}

/* ---------------------------------------------------------------------------
 * Colour treatments
 * ------------------------------------------------------------------------ */

.lookit-share-row--color-mono .elementor-share-btn {
	background-color: #3a4a48;
}

.lookit-share-row--color-official .elementor-share-btn_bluesky {
	background-color: #0a7aff;
}

.lookit-share-row--color-official .elementor-share-btn_x {
	background-color: #000000;
}

.lookit-share-row--color-official .elementor-share-btn_linkedin {
	background-color: #0a66c2;
}

.lookit-share-row--color-official .elementor-share-btn_facebook {
	background-color: #1877f2;
}

.lookit-share-row--color-official .elementor-share-btn_threads {
	background-color: #000000;
}

.lookit-share-row--color-official .elementor-share-btn_email {
	background-color: #3a4a48;
}

.lookit-share-row--color-official .elementor-share-btn_copy {
	background-color: #3a4a48;
}

/* ---------------------------------------------------------------------------
 * Copy Link
 * ------------------------------------------------------------------------ */

.lookit-share-row .elementor-share-btn_copy.is-copied,
.lookit-share-row--color-official .elementor-share-btn_copy.is-copied {
	background-color: var(--lsr-teal);
	color: #fff;
	filter: none;
}

.lookit-share-row--shape-bare .elementor-share-btn_copy.is-copied {
	background: none;
	color: var(--lsr-teal);
}

.lookit-share-row__confirm {
	margin-top: 10px;
	font-size: 0.8125rem;
	line-height: 1.5;
	font-weight: 500;
	color: #028673;
	overflow-wrap: anywhere;
}

.lookit-share-row__confirm[hidden] {
	display: none;
}

.lookit-share-row__confirm.is-error {
	color: #b32d2e;
}

/* ---------------------------------------------------------------------------
 * Tooltip. CSS only, no JetTricks, no tippy, no popper.
 * ------------------------------------------------------------------------ */

.lookit-share-row__tip {
	position: relative;
}

.lookit-share-row__tip::after {
	content: attr(data-lookit-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 9px;
	border-radius: 3px;
	background: #16201f;
	color: #fff;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 120ms ease;
	z-index: 5;
}

.lookit-share-row__tip:hover::after,
.lookit-share-row__tip:focus-visible::after {
	opacity: 1;
}

.lookit-share-row--view-icon-text .lookit-share-row__tip::after,
.lookit-share-row--view-text .lookit-share-row__tip::after {
	content: none;
}

.lookit-share-row__heading {
	font-weight: 700;
	margin: 0 0 0.5em;
}

@media (prefers-reduced-motion: reduce) {
	.lookit-share-row .elementor-share-btn,
	.lookit-share-row__tip::after {
		transition: none;
	}
}
