/*
 * NextGen SEO social edge rail.
 *
 * - transparent rail with no permanent icon containers;
 * - compact platform glyphs in the approved deep blue;
 * - complete icon artwork kept inside the viewport;
 * - icon/message group vertically centred on the selected screen edge;
 * - left and right messages face inward toward the page content;
 * - deep-blue circular background appears only on hover/focus/active.
 */
.ngs-social {
	position: static;
	height: 0;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--ngs-social-icon-color, var(--ngs-color-primary));
}

.ngs-social__container {
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	background: transparent !important;
}

.ngs-social__panel {
	position: fixed;
	top: 50%;
	bottom: auto;
	z-index: 9000;
	display: flex;
	width: auto;
	max-height: calc(100dvh - 2rem);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%);
	transition:
		opacity 160ms ease,
		visibility 160ms ease,
		transform 160ms ease;
}

.ngs-social--left .ngs-social__panel {
	left: max(0.5rem, env(safe-area-inset-left));
}

.ngs-social--right .ngs-social__panel,
.ngs-social--inline .ngs-social__panel {
	right: max(0.5rem, env(safe-area-inset-right));
}

/* Icons remain above the message and are centred as one rail group. */
.ngs-social__links {
	order: 1;
	display: flex !important;
	max-height: none;
	flex: 0 0 auto;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	overflow: visible;
	padding: 0.35rem 0.55rem;
	background: transparent !important;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.ngs-social__links::-webkit-scrollbar {
	display: none;
}

.ngs-social__message {
	order: 2;
	max-width: none;
	margin: 0.65rem 0 0;
	padding: 0;
	background: transparent !important;
	color: var(--ngs-social-text-color, #FFFFFF);
	font-size: var(--ngs-social-text-size, 10px);
	font-weight: 900;
	letter-spacing: 0.065em;
	line-height: 1;
	text-align: center;
	text-shadow: 0 0 1px rgba(11, 60, 93, 0.9);
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

/*
 * The left rail begins at the icon end and reads downward.
 * The right rail is mirrored so the face of the text points inward.
 */
.ngs-social--left .ngs-social__message {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: rotate(180deg);
	transform-origin: center;
}

.ngs-social--right .ngs-social__message,
.ngs-social--inline .ngs-social__message {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: none;
	transform-origin: center;
}

.ngs-social__link {
	display: inline-flex;
	width: max(2.25rem, calc(var(--ngs-social-icon-size, 17px) + 20px));
	min-width: max(2.25rem, calc(var(--ngs-social-icon-size, 17px) + 20px));
	height: max(2.25rem, calc(var(--ngs-social-icon-size, 17px) + 20px));
	min-height: max(2.25rem, calc(var(--ngs-social-icon-size, 17px) + 20px));
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: 0.42rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ngs-social-icon-color, var(--ngs-color-primary));
	text-decoration: none;
	box-shadow: none;
	overflow: visible;
	transition:
		transform 180ms ease,
		background-color 180ms ease,
		color 180ms ease,
		box-shadow 180ms ease;
}

.ngs-social__icon {
	display: inline-flex;
	width: var(--ngs-social-icon-size, 17px);
	height: var(--ngs-social-icon-size, 17px);
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	color: currentColor;
	font-size: calc(var(--ngs-social-icon-size, 17px) * 0.68);
	font-weight: 950;
	line-height: 0;
	overflow: visible;
	-webkit-text-stroke: 0.55px rgba(255, 255, 255, 0.92);
	paint-order: stroke fill;
	text-shadow: 0 0 1px rgba(255, 255, 255, 0.88);
}

.ngs-social__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
	overflow: visible;
	margin: auto;
	filter: drop-shadow(0 0 0.65px rgba(255, 255, 255, 0.95));
}

.ngs-social__icon .ngs-social__icon-fill {
	fill: currentColor;
	stroke: none;
}

@media (hover: hover) and (pointer: fine) {
	.ngs-social__link:hover {
		background: var(--ngs-color-primary);
		color: #FFFFFF;
		box-shadow: 0 0.5rem 1.05rem rgba(11, 60, 93, 0.22);
		transform: scale(1.04);
	}

	.ngs-social__link:hover .ngs-social__icon,
	.ngs-social__link:hover .ngs-social__icon svg {
		-webkit-text-stroke: 0;
		text-shadow: none;
		filter: none;
	}
}

.ngs-social__link:focus-visible {
	background: var(--ngs-color-primary);
	color: #FFFFFF;
	outline: 3px solid var(--ngs-color-accent);
	outline-offset: 2px;
	box-shadow: 0 0.5rem 1.05rem rgba(11, 60, 93, 0.22);
	transform: scale(1.04);
}

.ngs-social__link:focus-visible .ngs-social__icon,
.ngs-social__link:focus-visible .ngs-social__icon svg,
.ngs-social__link:active .ngs-social__icon,
.ngs-social__link:active .ngs-social__icon svg {
	-webkit-text-stroke: 0;
	text-shadow: none;
	filter: none;
}

/* Keep the selected left/right edge and vertical centring on tablet/mobile. */
@media (max-width: 1024px) {
	.ngs-social--left:not(.ngs-social--show-mobile),
	.ngs-social--right:not(.ngs-social--show-mobile),
	.ngs-social--inline:not(.ngs-social--show-mobile) {
		display: none;
	}

	.ngs-social__panel {
		top: 50%;
		bottom: auto;
		max-height: calc(100dvh - 1rem);
		pointer-events: none;
		transform: translateY(-50%);
	}

	.ngs-social--left .ngs-social__panel {
		left: max(0.15rem, env(safe-area-inset-left));
	}

	.ngs-social--right .ngs-social__panel,
	.ngs-social--inline .ngs-social__panel {
		right: max(0.15rem, env(safe-area-inset-right));
	}

	.ngs-social__links {
		max-height: none;
		gap: 0.04rem;
		padding: 0;
	}

	.ngs-social__message {
		margin-top: 0.32rem;
		font-size: min(var(--ngs-social-text-size, 10px), 9px);
		letter-spacing: 0.04em;
		opacity: 0.76;
	}

	.ngs-social__link {
		width: 1.95rem;
		min-width: 1.95rem;
		height: 1.95rem;
		min-height: 1.95rem;
		padding: 0.34rem;
		opacity: 0.78;
		pointer-events: auto;
	}

	.ngs-social__link:hover,
	.ngs-social__link:focus-visible,
	.ngs-social__link:active {
		opacity: 1;
	}

	.ngs-social__icon {
		width: min(var(--ngs-social-icon-size, 17px), 16px);
		height: min(var(--ngs-social-icon-size, 17px), 16px);
		-webkit-text-stroke-width: 0.45px;
		text-shadow: 0 0 0.75px rgba(255, 255, 255, 0.82);
	}

	.ngs-social__icon svg {
		filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.86));
	}
}

@media (max-width: 479px) {
	.ngs-social--left .ngs-social__panel {
		left: max(1px, env(safe-area-inset-left));
	}

	.ngs-social--right .ngs-social__panel,
	.ngs-social--inline .ngs-social__panel {
		right: max(1px, env(safe-area-inset-right));
	}

	.ngs-social__message {
		margin-top: 0.25rem;
		font-size: min(var(--ngs-social-text-size, 10px), 8.5px);
		letter-spacing: 0.032em;
		opacity: 0.7;
	}

	.ngs-social__links {
		gap: 0;
	}

	.ngs-social__link {
		width: 1.72rem;
		min-width: 1.72rem;
		height: 1.72rem;
		min-height: 1.72rem;
		padding: 0.28rem;
		opacity: 0.72;
	}

	.ngs-social__icon {
		width: min(var(--ngs-social-icon-size, 17px), 14px);
		height: min(var(--ngs-social-icon-size, 17px), 14px);
	}
}

@media (hover: none) and (pointer: coarse) {
	.ngs-social__link:active {
		background: var(--ngs-color-primary);
		color: #FFFFFF;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ngs-social__panel,
	.ngs-social__link {
		transition: none;
	}

	.ngs-social__link:hover,
	.ngs-social__link:focus-visible {
		transform: none;
	}
}
