/* Dolna belka nawigacyjna (telefon): Glowna, Szukaj/Termin/Zarezerwuj, Ulubione, Konto, WhatsApp.
   Wariant A (klasyczny): ikona + podpis przy kazdej pozycji, aktywna ma wskaznik u gory. Chowa sie przy przewijaniu w dol (html bez .mc-bar-up),
   wraca przy przewijaniu w gore. Logika: frontend/js/bottom-bar.js. */
.mc-bar { display: none; }

@media (max-width: 767px), (orientation: landscape) and (max-width: 960px) and (max-height: 500px) {
	.mc-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9995; align-items: stretch; gap: 2px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: #f9fbfe; border-top: 1px solid #e6eef6; box-shadow: 0 -3px 14px rgba(60, 100, 140, .07); font-family: 'Open Sans', Arial, sans-serif; transition: transform .22s ease; }
	html:not(.mc-bar-up) .mc-bar { transform: translateY(115%); }
	body.mc-consent-open .mc-bar, body.mc-menu-open .mc-bar, body.mc-fav-modal-open .mc-bar, html.overlay .mc-bar { display: none; }
	/* miejsce na belke, zeby nie zaslaniala stopki */
	body:not(.mc-bar-none) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	body:not(.mc-bar-none).mc-consent-open { padding-bottom: var(--mc-consent-h, 0px); }

	.mc-bar-item { flex: 1 1 0; min-width: 0; height: 52px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; margin: 0; padding: 4px 0 2px; border: 0; border-radius: 12px; background: none; color: #6b7f93; font: inherit; text-decoration: none; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
	.mc-bar-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
	.mc-bar-label { display: block; font-size: 10.5px; line-height: 1.1; font-weight: 600; white-space: nowrap; }
	.mc-bar-item.is-active { color: #3a78a6; }
	.mc-bar-item.is-active::before { content: ''; position: absolute; top: -5px; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: #9bd3f3; }
	.mc-bar-item:focus-visible { outline: 2px solid #0b5fa5; outline-offset: -2px; }
	.mc-bar-item--wa { color: #3a8f58; }
	/* Szukaj <-> Termin (strona jachtu): ikona kalendarza zamiast lupy */
	.mc-bar-ico-cal { display: none; }
	.mc-bar[data-yacht] .mc-bar-ico-search { display: none; }
	.mc-bar[data-yacht] .mc-bar-ico-cal { display: block; }
	/* po wybraniu terminu: "Zarezerwuj" (pastelowy pomaranczowy) */
	.mc-bar-item.is-reserve { background: #ffe0b0; color: #8a4b00; }
	.mc-bar-item.is-reserve::before { display: none; }
	.mc-bar-badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e0605e; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; text-align: center; box-sizing: border-box; }
	.mc-bar-badge[hidden] { display: none; }

	/* Przyciski, ktore przejmuje belka */
	/* Pozycja wylaczona w adminie (body.mc-bar-no-*) = przycisk plywajacy zostaje */
	body:not(.mc-bar-no-wa) .mc-whatsapp-fab, body:not(.mc-bar-no-search) a#floating-reserve-cta, body:not(.mc-bar-no-fav) .fav-floating-container { display: none !important; }
	body:not(.mc-bar-no-search) a#floating-search-cta:not(.floating-search-cta--active) { display: none !important; }
	body:not(.mc-bar-none) #pwa-install-btn { bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
	/* Na zmiane z belka: gdy belka jest widoczna, plywajace przyciski wyszukiwania (Zmien/Wyczysc/wynik) sa ukryte, po schowaniu belki wracaja */
	#floating-search-group { transition: opacity .2s ease; }
	html.mc-bar-up:not(.overlay) body:not(.mc-consent-open):not(.mc-menu-open):not(.mc-bar-none):not(.mc-bar-no-search) #floating-search-group { opacity: 0; visibility: hidden; pointer-events: none; }
}
