.stn-share {
	position: relative;
	display: inline-block;
	font-family: inherit;
	overflow: visible !important;
}

.stn-share__toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #d7dbe0;
	border-radius: 10px;
	background: #ffffff;
	color: #111827;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stn-share__toggle:hover,
.stn-share__toggle:focus {
	background: #f8fafc;
	border-color: #c7ced6;
	outline: none;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.stn-share__toggle-icon,
.stn-share__item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.stn-share__toggle-icon svg,
.stn-share__item-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

.stn-share__caret {
	font-size: 13px;
	opacity: 0.7;
}

/* Portal is moved to document.body while open so fixed layers are not trapped by theme stacking contexts. */
.stn-share__portal {
	display: none;
}

.stn-share__portal.stn-share__portal--active {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	padding: 12px;
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
}

.stn-share__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
	-webkit-tap-highlight-color: transparent;
}

.stn-share__menu {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	min-width: 0;
	max-height: min(72vh, 520px);
	overflow: auto;
	background: #ffffff;
	border: 1px solid #d7dbe0;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
	padding: 12px;
	box-sizing: border-box;
}

.stn-share__item {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #111827;
	padding: 12px 14px;
	border-radius: 10px;
	transition: background-color 0.2s ease;
}

.stn-share__item:hover,
.stn-share__item:focus {
	background: #f3f4f6;
	outline: none;
}

.stn-share__item-icon--facebook {
	color: #1877f2;
}

.stn-share__item-icon--x {
	color: #000000;
}

.stn-share__item-icon--linkedin {
	color: #0a66c2;
}

.stn-share__item-icon--reddit {
	color: #ff4500;
}

.stn-share__item-icon--whatsapp {
	color: #25d366;
}

.stn-share__item-icon--telegram {
	color: #229ed9;
}

.stn-share__item-icon--pinterest {
	color: #e60023;
}

.stn-share__item-icon--tumblr {
	color: #001935;
}

.stn-share__item-icon--bluesky {
	color: #1185fe;
}

.stn-share__item-icon--mastodon {
	color: #6364ff;
}

.stn-share__item-label,
.stn-share__toggle-text {
	white-space: nowrap;
}

.stn-share__count {
	margin-left: auto;
	min-width: 1.25em;
	font-size: 0.875rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #6b7280;
	text-align: right;
}

.stn-share__sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 4px 12px;
	margin: -4px -4px 8px;
	border-bottom: 1px solid #e5e7eb;
}

.stn-share__sheet-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #111827;
}

.stn-share__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin: -6px -8px -6px 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #374151;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.stn-share__close:hover,
.stn-share__close:focus {
	background: #f3f4f6;
	color: #111827;
	outline: none;
}

html.stn-share-scroll-locked {
	overflow: hidden;
}

@media (min-width: 783px) {
	.stn-share__portal.stn-share__portal--active {
		justify-content: center;
		align-items: center;
		padding: 24px;
	}

	.stn-share__menu {
		width: min(400px, 100%);
		max-height: min(70vh, 560px);
		border-radius: 14px;
	}
}

@media (max-width: 782px) {
	.stn-share__caret {
		display: none;
	}

	.stn-share__menu {
		max-width: none;
		margin-bottom: 0;
		box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
	}
}
