/**
 * SerwisFox - CTA Montaż. Style odwzorowują oryginalny mockup:
 * fonty Teko (nagłówki/telefon) + Poppins (treść, ładowane przez motyw),
 * kolor marki #ed1c24, akcent #ff5a60, kanciaste narożniki, przyciski radius 5px.
 * Wszystko scoped pod .sfmontaz* i ładowane tylko na wpisach realizacji.
 */

/* ---------- Przełączanie wariantów wg szerokości ---------- */
.sfmontaz--mobile {
	display: none;
}

@media (min-width: 992px) {
	/* Motyw na tablecie ustawia html,body{overflow-x:hidden} (ucięcie wystającego topbara),
	   co tworzy scroll-container i zabija position:sticky. clip przycina tak samo, ale
	   NIE tworzy scroll-containera - sticky działa. Zgodne z rozwiązaniem z mockupu.
	   Nie ruszamy overflow-y, by nie nadpisać ewentualnej blokady scrolla pod modalem. */
	html,
	body {
		overflow-x: clip !important;
	}

	/* Sidebar motywu rozciągnięty do wysokości kolumny treści - daje zakres dla sticky. */
	.page-sidebar {
		height: 100%;
	}
	/* Sticky na wrapperze (bezpośrednie dziecko sidebara), NIE na boxie -
	   inaczej zakres przyklejenia = wysokość boxu i element "odjeżdża". */
	.sfmontaz--desktop {
		position: sticky;
		top: 24px;
	}
}

@media (max-width: 991px) {
	.sfmontaz--desktop {
		display: none;
	}
	.sfmontaz--mobile {
		display: block;
	}
}

/* ============================================================
   Desktop - sticky box w sidebarze.
   ============================================================ */
.sfmontaz-box {
	background: #1f1f1f;
	color: #fff;
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
	font-family: 'Poppins', Arial, sans-serif;
	text-align: center;
	line-height: 1.45;
}

.sfmontaz-box__photo {
	height: 210px;
	overflow: hidden;
}

.sfmontaz-box__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
}

.sfmontaz-box__in {
	padding: 1.05rem 1.3rem 1.1rem;
}

.sfmontaz-box__k {
	display: block;
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff5a60;
}

/* Wyższa specyficzność + reset tła/ikony wstrzykiwanych przez motyw w nagłówki sidebara. */
.sfmontaz-box h3.sfmontaz-box__heading {
	margin: 0.35rem 0 0.3rem;
	padding: 0;
	background: none;
	background-image: none;
	border: 0;
	box-shadow: none;
	font-family: 'Teko', sans-serif;
	font-weight: 500;
	font-size: 1.6rem;
	line-height: 1.05;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #fff;
}

.sfmontaz-box__rate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1rem;
	margin: 0.5rem 0 0;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sfmontaz-box__rate-top {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.sfmontaz-box__rate-top strong {
	color: #fff;
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.5px;
	line-height: 1;
	transform: translateY(-5px);
}

.sfmontaz-box__stars {
	position: relative;
	display: inline-block;
	font-size: 1.1rem;
	line-height: 1;
	letter-spacing: 1px;
	transform: translateY(5px);
}

.sfmontaz-box__stars-base {
	color: #555;
}

.sfmontaz-box__stars-fill {
	position: absolute;
	left: 0;
	top: 0;
	color: #ffc107;
	overflow: hidden;
	white-space: nowrap;
}

.sfmontaz-box__reviews {
	font-size: 0.75rem;
	color: #d6d6d6;
	letter-spacing: 0.03em;
}

.sfmontaz-box__reviews a {
	color: #d6d6d6;
	text-decoration: underline;
}

.sfmontaz-box__reviews a:hover {
	color: #fff;
}

.sfmontaz-box__loc {
	font-size: 0.85rem;
	color: #d8d8d8;
	font-weight: 500;
	margin: 0.75rem 0 0.35rem;
}

.sfmontaz-box__hours {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	font-size: 0.8rem;
	color: #cfcfcf;
	font-weight: 500;
	letter-spacing: 0.01em;
	margin: 0;
}

.sfmontaz-box__hours svg {
	width: 14px;
	height: 14px;
	stroke: #ff5a60;
	flex: 0 0 14px;
}

.sfmontaz-box__tel {
	display: block;
	font-family: 'Teko', sans-serif;
	font-size: 1.85rem;
	color: #fff;
	text-decoration: none;
	letter-spacing: 0.5px;
	margin: 0.5rem 0 0.7rem;
}

.sfmontaz-box__tel:hover {
	color: #fff;
}

.sfmontaz-box__cta {
	display: block;
	background: #ed1c24;
	color: #fff;
	font-weight: 500;
	font-size: 0.95rem;
	padding: 0.75rem;
	border-radius: 5px;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.sfmontaz-box__cta:hover,
.sfmontaz-box__cta:focus {
	background: #c8151c;
	color: #fff;
}

/* ============================================================
   Mobile - panel fixed na dole, sterowany przez IntersectionObserver.
   ============================================================ */
.sfmontaz--mobile {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	background: #1f1f1f;
	padding: 0.9rem calc(0.9rem + env(safe-area-inset-right, 0px)) calc(0.9rem + env(safe-area-inset-bottom, 0px)) calc(0.9rem + env(safe-area-inset-left, 0px));
	text-align: center;
	font-family: 'Poppins', Arial, sans-serif;
	box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.4);
	transform: translateY(0);
	transition: transform 0.3s ease;
	will-change: transform;
}

.sfmontaz--mobile.sfmontaz--hidden {
	transform: translateY(110%);
}

.sfmontaz-mcta__btn {
	display: block;
	background: #ed1c24;
	color: #fff;
	font-weight: 500;
	font-size: 1.02rem;
	padding: 0.8rem;
	border-radius: 5px;
	text-decoration: none;
}

.sfmontaz-mcta__btn:hover,
.sfmontaz-mcta__btn:focus {
	background: #c8151c;
	color: #fff;
}

.sfmontaz-mcta__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-top: 0.6rem;
	font-size: 0.72rem;
	font-weight: 500;
	color: #bdbdbd;
	line-height: 1;
}

.sfmontaz-mcta__rate {
	display: inline-flex;
	align-items: center;
	gap: 0.26rem;
	color: #d6d6d6;
	white-space: nowrap;
	flex: 0 0 auto;
}

.sfmontaz-mcta__star {
	color: #ffc107;
	font-size: 0.92rem;
	line-height: 1;
}

.sfmontaz-mcta__rate b {
	color: #fff;
	font-weight: 700;
}

.sfmontaz-mcta__sep {
	opacity: 0.45;
	margin: 0 0.08rem;
}

.sfmontaz-mcta__loc {
	white-space: nowrap;
	flex: 1 1 auto;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfmontaz-mcta__hours {
	white-space: nowrap;
	flex: 0 0 auto;
}

/* Gdy panel jest widoczny, podnieś pływający badge cookies nad belkę, żeby jej nie
   zasłaniał. Wzorzec z ajkamat. Serwis używa CookieFirst; dorzucone też selektory
   CookieScript (jak w ajkamat) na wypadek zmiany dostawcy. Tylko mobile; reguły
   html-prefixowane + !important, by przebić arkusz wtyczki cookies.
   Offset = wysokość belki + margines. */
@media (max-width: 991px) {
	html body .cookiefirst-root [data-cookiefirst-action="open-preferences"],
	html body [data-testid="reopenSettingsBtn"],
	html body #cookiescript_badge,
	html body #cookiescript_injected.cookiescript_badge_only {
		transition: bottom 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
	}
	html.sfmontaz-bar-on body .cookiefirst-root [data-cookiefirst-action="open-preferences"],
	html.sfmontaz-bar-on body [data-testid="reopenSettingsBtn"],
	html.sfmontaz-bar-on body #cookiescript_badge,
	html.sfmontaz-bar-on body #cookiescript_injected.cookiescript_badge_only {
		bottom: calc(var(--sfmontaz-bar-h, 110px) + 14px) !important;
	}
}
