/**
 * Offirex Social Share — front-end widget
 */

/* Material Symbols: force correct font (theme “font: inherit” often breaks ligatures). */
.offirex-ss .material-symbols-outlined {
	font-family: "Material Symbols Outlined", sans-serif;
	font-weight: normal;
	font-style: normal;
	font-size: 22px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	font-feature-settings: "liga";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

#offirex-ss.offirex-ss {
	position: fixed;
	z-index: 99990;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.2;
	pointer-events: none;
}

/* Fixed anchor per edge + vertical alignment (no offset). */
#offirex-ss.offirex-ss[data-side="right"][data-v="center"] {
	top: 50%;
	right: 0;
	left: auto;
	bottom: auto;
	transform: translateY(-50%);
}

#offirex-ss.offirex-ss[data-side="left"][data-v="center"] {
	top: 50%;
	left: 0;
	right: auto;
	bottom: auto;
	transform: translateY(-50%);
}

#offirex-ss.offirex-ss[data-side="right"][data-v="top"] {
	top: 0;
	right: 0;
	left: auto;
	bottom: auto;
	transform: none;
}

#offirex-ss.offirex-ss[data-side="left"][data-v="top"] {
	top: 0;
	left: 0;
	right: auto;
	bottom: auto;
	transform: none;
}

#offirex-ss.offirex-ss[data-side="right"][data-v="bottom"] {
	bottom: 0;
	right: 0;
	left: auto;
	top: auto;
	transform: none;
}

#offirex-ss.offirex-ss[data-side="left"][data-v="bottom"] {
	bottom: 0;
	left: 0;
	right: auto;
	top: auto;
	transform: none;
}

/* Entrance: slide in from the edge after 0.5s (Material Symbols get a moment to load). */
@media (prefers-reduced-motion: no-preference) {
	#offirex-ss.offirex-ss[data-side="right"][data-v="center"] {
		animation: offirex-ss-in-right-c 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}

	#offirex-ss.offirex-ss[data-side="left"][data-v="center"] {
		animation: offirex-ss-in-left-c 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}

	#offirex-ss.offirex-ss[data-side="right"][data-v="top"] {
		animation: offirex-ss-in-right-tb 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}

	#offirex-ss.offirex-ss[data-side="left"][data-v="top"] {
		animation: offirex-ss-in-left-tb 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}

	#offirex-ss.offirex-ss[data-side="right"][data-v="bottom"] {
		animation: offirex-ss-in-right-tb 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}

	#offirex-ss.offirex-ss[data-side="left"][data-v="bottom"] {
		animation: offirex-ss-in-left-tb 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
	}
}

@keyframes offirex-ss-in-right-c {
	from {
		transform: translate3d(100%, -50%, 0);
	}
	to {
		transform: translate3d(0, -50%, 0);
	}
}

@keyframes offirex-ss-in-left-c {
	from {
		transform: translate3d(-100%, -50%, 0);
	}
	to {
		transform: translate3d(0, -50%, 0);
	}
}

@keyframes offirex-ss-in-right-tb {
	from {
		transform: translate3d(100%, 0, 0);
	}
	to {
		transform: translate3d(0, 0, 0);
	}
}

@keyframes offirex-ss-in-left-tb {
	from {
		transform: translate3d(-100%, 0, 0);
	}
	to {
		transform: translate3d(0, 0, 0);
	}
}

.offirex-ss * {
	box-sizing: border-box;
}

/* Row: tab + panel; edge side mirrors with row-reverse */
.offirex-ss__stack {
	display: flex;
	flex-direction: row;
	align-items: center;
	pointer-events: auto;
	width: max-content;
	max-width: 100vw;
	position: relative;
	z-index: 1;
}

.offirex-ss[data-side="right"] .offirex-ss__stack {
	align-self: flex-end;
	margin-left: auto;
}

.offirex-ss[data-side="left"] .offirex-ss__stack {
	flex-direction: row-reverse;
	align-self: flex-start;
	margin-right: auto;
}

/* Tab protrudes toward the page; chevron points into the hidden panel until open */
.offirex-ss__tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 10px 6px;
	margin: 0;
	border: none;
	background: var(--offirex-ss-tab-bg, #e0e0e0);
	color: var(--offirex-ss-tab-fg, #1a1a1a);
	cursor: pointer;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
	flex-shrink: 0;
	position: relative;
	z-index: 0;
	transition: filter 0.22s ease;
}

.offirex-ss__tab:hover {
	filter: brightness(0.95);
}

.offirex-ss__tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.offirex-ss[data-side="right"] .offirex-ss__tab {
	border-radius: 6px 0 0 6px;
}

.offirex-ss[data-side="left"] .offirex-ss__tab {
	border-radius: 0 6px 6px 0;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
}

.offirex-ss__tab:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.offirex-ss__tab-icon,
.offirex-ss__chevron {
	font-size: 22px;
	line-height: 1;
	width: 1em;
	height: 1em;
}

.offirex-ss__chevron {
	transition: transform 0.22s ease;
}

/* Open: flip horizontal arrow (points toward screen edge / “close”) */
.offirex-ss.is-open .offirex-ss__chevron {
	transform: rotate(180deg);
}

/* Collapsed: hide panel (horizontal slide) */
.offirex-ss__panel-wrap {
	overflow: hidden;
	max-width: 0;
	max-height: none;
	opacity: 0;
	visibility: hidden;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	transition:
		max-width 0.28s ease,
		opacity 0.2s ease,
		visibility 0.2s ease;
}

.offirex-ss.is-open .offirex-ss__panel-wrap {
	max-width: min(120px, 40vw);
	opacity: 1;
	visibility: visible;
	overflow: visible;
}

/* Narrow strip; hover labels use higher z-index to paint over the tab when overlapping */
.offirex-ss__panel {
	border-radius: 4px 0 0 4px;
	width: 52px;
	background: var(--offirex-ss-widget-bg, #004482);
	padding: 8px 6px;
	box-shadow: -4px 0 16px rgba(0, 0, 0, 0.18);
}

.offirex-ss[data-side="left"] .offirex-ss__panel {
	box-shadow: 4px 0 16px rgba(0, 0, 0, 0.18);
	border-radius: 0 4px 4px 0;
}

.offirex-ss__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.offirex-ss__item {
	position: relative;
	margin: 0;
	padding: 0;
}

.offirex-ss__link {
	display: block;
	position: relative;
	width: 40px;
	height: 40px;
	margin-left: auto;
	margin-right: 0;
	text-decoration: none;
	color: var(--offirex-ss-icon-color, #fff);
}

.offirex-ss[data-side="left"] .offirex-ss__link {
	margin-left: 0;
	margin-right: auto;
}

.offirex-ss__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--offirex-ss-icon-bg, #004482);
	border-radius: 4px;
	color: inherit;
	position: relative;
	z-index: 2;
}

.offirex-ss__mi,
.offirex-ss__svg {
	display: block;
}

.offirex-ss__mi {
	font-size: 22px;
}

/* Hover label: can overlap the tab */
.offirex-ss__link--hover .offirex-ss__hover-label {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding: 0 12px;
	white-space: nowrap;
	background: var(--offirex-ss-icon-bg, #004482);
	color: var(--offirex-ss-icon-color, #fff);
	border-radius: 4px 0 0 4px;
	box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
	z-index: 5;
	opacity: 0;
	pointer-events: none;
	transform: translateX(6px);
	transition:
		opacity 0.2s ease,
		transform 0.22s ease;
}

.offirex-ss[data-side="right"] .offirex-ss__link--hover .offirex-ss__hover-label {
	right: 40px;
	left: auto;
	transform: translateX(12px);
}

.offirex-ss[data-side="left"] .offirex-ss__link--hover .offirex-ss__hover-label {
	left: 40px;
	right: auto;
	transform: translateX(-12px);
	box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}

.offirex-ss__link--hover:hover .offirex-ss__hover-label,
.offirex-ss__link--hover:focus-within .offirex-ss__hover-label {
	opacity: 1;
	pointer-events: auto;
}

.offirex-ss[data-side="right"] .offirex-ss__link--hover:hover .offirex-ss__hover-label,
.offirex-ss[data-side="right"] .offirex-ss__link--hover:focus-within .offirex-ss__hover-label {
	transform: translateX(0);
}

.offirex-ss[data-side="left"] .offirex-ss__link--hover:hover .offirex-ss__hover-label,
.offirex-ss[data-side="left"] .offirex-ss__link--hover:focus-within .offirex-ss__hover-label {
	transform: translateX(0);
}

.offirex-ss__link--hover {
	transition: transform 0.22s ease;
}

.offirex-ss[data-side="right"] .offirex-ss__link--hover:hover,
.offirex-ss[data-side="right"] .offirex-ss__link--hover:focus-within {
	transform: translateX(-6px);
}

.offirex-ss[data-side="left"] .offirex-ss__link--hover:hover,
.offirex-ss[data-side="left"] .offirex-ss__link--hover:focus-within {
	transform: translateX(6px);
}

.offirex-ss__link:focus-visible .offirex-ss__icon {
	outline: 2px solid rgba(255, 255, 255, 0.85);
	outline-offset: 2px;
}

.offirex-ss .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
	.offirex-ss__panel-wrap,
	.offirex-ss__chevron,
	.offirex-ss__link--hover,
	.offirex-ss__link--hover .offirex-ss__hover-label {
		transition: none;
	}
}
