/* Strojařem.cz – Facebook panel v1.0.3 */

.sjfb-root {
	--sjfb-blue: #1877f2;
	--sjfb-blue-dark: #1264cf;
	--sjfb-ink: #20262d;
	--sjfb-border: #dfe3e6;
	--sjfb-panel-width: 360px;
	--sjfb-panel-height: 520px;
	--sjfb-panel-top: 38%;
	--sjfb-desktop-tab-width: 126px;
	--sjfb-mobile-breakpoint: 921px;
}

/* =====================================================
   DESKTOP – panel
   ===================================================== */

.sjfb-desktop-panel {
	position: fixed;
	z-index: 99980;
	top: var(--sjfb-panel-top);
	left: 0;
	display: flex;
	width: calc(
		var(--sjfb-panel-width) +
		var(--sjfb-desktop-tab-width)
	);
	height: var(--sjfb-panel-height);
	max-height: calc(100vh - 40px);
	transform: translate(
		calc(-1 * var(--sjfb-panel-width)),
		-50%
	);
	transition: transform .28s ease;
	filter: drop-shadow(
		0 12px 24px rgba(22, 31, 40, .16)
	);
}

.sjfb-desktop-panel.is-open {
	transform: translate(0, -50%);
}

/* =====================================================
   DESKTOP – kompaktní vodorovná záložka
   ===================================================== */

.sjfb-desktop-tab,
.sjfb-desktop-tab:link,
.sjfb-desktop-tab:visited {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 50%;
	right: 0;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: var(--sjfb-desktop-tab-width) !important;
	min-width: var(--sjfb-desktop-tab-width) !important;
	height: 48px !important;
	min-height: 48px !important;
	margin: 0;
	padding: 0 14px !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue) !important;
	border: 0 !important;
	border-color: transparent !important;
	border-radius: 0 12px 12px 0 !important;
	box-shadow:
		0 7px 18px rgba(24, 119, 242, .22);
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
	text-decoration: none !important;
	transform: translateY(-50%);
	transition:
		background-color .18s ease,
		box-shadow .18s ease,
		transform .18s ease;
}

.sjfb-desktop-tab:hover,
.sjfb-desktop-tab:focus,
.sjfb-desktop-tab:focus-visible,
.sjfb-desktop-tab:active,
.sjfb-desktop-panel.is-open .sjfb-desktop-tab {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue-dark) !important;
	border-color: transparent !important;
	box-shadow:
		0 10px 22px rgba(24, 119, 242, .28);
}

.sjfb-desktop-panel:not(.is-open)
.sjfb-desktop-tab:hover {
	transform:
		translateY(-50%)
		translateX(4px);
}

.sjfb-desktop-tab:focus-visible,
.sjfb-desktop-panel__close:focus-visible,
.sjfb-mobile-link:focus-visible,
.sjfb-desktop-panel__visit:focus-visible {
	outline: 3px solid rgba(24, 119, 242, .3);
	outline-offset: 3px;
}

.sjfb-desktop-tab__icon {
	display: flex;
	flex: 0 0 20px;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: inherit;
}

.sjfb-desktop-tab__icon svg {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	fill: currentColor;
}

.sjfb-desktop-tab__icon svg path {
	fill: currentColor;
}

.sjfb-desktop-tab__text {
	display: inline-block;
	color: inherit;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1;
	white-space: nowrap;
	writing-mode: initial !important;
	transform: none !important;
}

/* =====================================================
   DESKTOP – obsah vysouvacího panelu
   ===================================================== */

.sjfb-desktop-panel__content {
	display: flex;
	flex-direction: column;
	width: var(--sjfb-panel-width);
	height: 100%;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid var(--sjfb-border);
	border-left: 0;
	border-radius: 0 14px 14px 0;
}

.sjfb-desktop-panel__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
	padding: 13px 14px 12px 18px;
	border-bottom: 1px solid #e8ebed;
}

.sjfb-desktop-panel__header > div {
	min-width: 0;
}

.sjfb-desktop-panel__eyebrow {
	display: block;
	margin-bottom: 2px;
	color: var(--sjfb-blue);
	font-family: inherit;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.sjfb-desktop-panel__header strong {
	display: block;
	overflow: hidden;
	color: var(--sjfb-ink);
	font-family: inherit;
	font-size: 17px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* =====================================================
   DESKTOP – zavírací tlačítko
   ===================================================== */

.sjfb-desktop-panel__close,
.sjfb-desktop-panel__close:focus,
.sjfb-desktop-panel__close:active {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue) !important;
	border: 1px solid var(--sjfb-blue) !important;
	border-radius: 50%;
	box-shadow: none !important;
	cursor: pointer;
}

.sjfb-desktop-panel__close:hover,
.sjfb-desktop-panel__close:focus-visible {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue-dark) !important;
	border-color: var(--sjfb-blue-dark) !important;
}

.sjfb-desktop-panel__close svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: currentColor !important;
}

.sjfb-desktop-panel__close svg path {
	fill: currentColor !important;
}

/* =====================================================
   DESKTOP – Facebook iframe
   ===================================================== */

.sjfb-desktop-panel__frame-wrap {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: #f5f6f7;
}

.sjfb-desktop-panel__frame-wrap iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.sjfb-desktop-panel__loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	color: #667078;
	font-family: inherit;
	font-size: 14px;
	text-align: center;
}

.sjfb-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid #d9e7fb;
	border-top-color: var(--sjfb-blue);
	border-radius: 50%;
	animation: sjfb-spin .8s linear infinite;
}

@keyframes sjfb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* =====================================================
   DESKTOP – tlačítko navštívit Facebook
   ===================================================== */

.sjfb-desktop-panel__visit,
.sjfb-desktop-panel__visit:link,
.sjfb-desktop-panel__visit:visited {
	display: flex;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 16px;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue);
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;
}

.sjfb-desktop-panel__visit:hover,
.sjfb-desktop-panel__visit:focus {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	background: var(--sjfb-blue-dark);
}

.sjfb-desktop-panel__visit svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* =====================================================
   Zobrazení desktop / mobil
   ===================================================== */

.sjfb-mobile-link {
	display: none;
}

.sjfb-root--desktop-disabled
.sjfb-desktop-panel {
	display: none !important;
}

.sjfb-root--mobile-disabled
.sjfb-mobile-link {
	display: none !important;
}

/* Podpora vlastního breakpointu z nastavení přes JS třídu */
.sjfb-root.sjfb-is-mobile
.sjfb-desktop-panel {
	display: none !important;
}

.sjfb-root:not(.sjfb-is-mobile)
.sjfb-mobile-link {
	display: none !important;
}

/* =====================================================
   MOBIL – ikona vložená JavaScriptem do hlavičky
   ===================================================== */

@media (max-width: 921px) {

	.sjfb-desktop-panel {
		display: none !important;
	}

	/* Ikona a hamburger zůstanou na jednom řádku. */
	.sjfb-mobile-actions-host {
		display: flex !important;
		flex-flow: row nowrap !important;
		align-items: center !important;
		justify-content: flex-end !important;
		gap: 8px !important;
		min-width: 0 !important;
		width: auto !important;
	}

	.sjfb-mobile-actions-host > * {
		flex-shrink: 0 !important;
	}

	.sjfb-mobile-link,
	.sjfb-mobile-link:link,
	.sjfb-mobile-link:visited {
		-webkit-appearance: none;
		appearance: none;
		display: inline-flex !important;
		flex: 0 0 34px !important;
		align-items: center;
		justify-content: center;
		width: 34px !important;
		height: 34px !important;
		min-width: 34px !important;
		margin: 0 !important;
		padding: 0 !important;
		color: var(--sjfb-blue) !important;
		-webkit-text-fill-color:
			var(--sjfb-blue) !important;
		background: #eef5ff !important;
		border: 1px solid #d6e6fb !important;
		border-radius: 8px !important;
		box-shadow: none !important;
		line-height: 0 !important;
		text-decoration: none !important;
	}

	.sjfb-mobile-link:hover,
	.sjfb-mobile-link:focus,
	.sjfb-mobile-link:focus-visible,
	.sjfb-mobile-link:active {
		color: #ffffff !important;
		-webkit-text-fill-color: #ffffff !important;
		background: var(--sjfb-blue) !important;
		border-color: var(--sjfb-blue) !important;
	}

	.sjfb-mobile-link svg {
		display: block !important;
		width: 20px !important;
		height: 20px !important;
		margin: 0 !important;
		fill: currentColor !important;
	}

	.sjfb-mobile-link svg path {
		fill: currentColor !important;
	}

	.sjfb-mobile-link.sjfb-mobile-link--inserted {
		position: relative;
		z-index: 5;
	}

	/* Pojistka pro pravou mobilní sekci Astry. */
	.ast-mobile-header-wrap
	.site-header-primary-section-right,
	#ast-mobile-header
	.site-header-primary-section-right {
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-end !important;
	}
}

@media (min-width: 922px) {

	.sjfb-mobile-link {
		display: none !important;
	}
}

/* =====================================================
   Omezení animací
   ===================================================== */

@media (prefers-reduced-motion: reduce) {

	.sjfb-desktop-panel,
	.sjfb-desktop-tab,
	.sjfb-spinner {
		transition: none;
		animation: none;
	}
}

/* =====================================================
   OPRAVA v1.0.3 – bezpečná kompaktní desktopová záložka
   Zachovává původní rozměr a posun panelu z funkční verze 1.0.2.
   Záložka je širší pouze pomocí přesahu mimo obal panelu.
   ===================================================== */

@media (min-width: 922px) {
	.sjfb-desktop-panel {
		width: calc(var(--sjfb-panel-width) + 54px) !important;
		overflow: visible !important;
	}

	.sjfb-desktop-tab,
	.sjfb-desktop-tab:link,
	.sjfb-desktop-tab:visited {
		right: -68px !important;
		display: inline-flex !important;
		flex-direction: row !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 8px !important;
		width: 122px !important;
		min-width: 122px !important;
		height: 48px !important;
		min-height: 48px !important;
		padding: 0 14px !important;
		border-radius: 0 12px 12px 0 !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.sjfb-desktop-tab__icon,
	.sjfb-desktop-tab__icon svg {
		flex: 0 0 20px !important;
		width: 20px !important;
		height: 20px !important;
	}

	.sjfb-desktop-tab__text {
		display: inline-block !important;
		font-size: 13px !important;
		font-weight: 800 !important;
		letter-spacing: 0 !important;
		line-height: 1 !important;
		white-space: nowrap !important;
		writing-mode: horizontal-tb !important;
		transform: none !important;
	}

	.sjfb-desktop-panel:not(.is-open) .sjfb-desktop-tab:hover {
		transform: translateY(-50%) translateX(4px) !important;
	}
}
