/**
 * Mobile app chrome — bottom nav + float clearance
 * Visible only below Flatsome medium breakpoint (850px).
 */

:root {
	--osram-bottom-nav-height: 60px;
	--osram-bottom-nav-safe: env(safe-area-inset-bottom, 0px);
	--osram-bottom-nav-offset: calc(var(--osram-bottom-nav-height) + var(--osram-bottom-nav-safe));
	--osram-float-gap: 16px;
	--osram-float-clearance: calc(var(--osram-bottom-nav-offset) + var(--osram-float-gap));
}

.osram-bottom-nav {
	display: none;
}

@media (max-width: 849px) {
	body.has-osram-bottom-nav {
		padding-bottom: var(--osram-bottom-nav-offset);
	}

	/* App-like sticky header surface */
	body.has-osram-bottom-nav .header-wrapper {
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
	}

	body.has-osram-bottom-nav .header-main {
		min-height: 56px;
	}

	/* Keep page content clear of the bar */
	body.has-osram-bottom-nav #footer,
	body.has-osram-bottom-nav .footer-wrapper,
	body.has-osram-bottom-nav .absolute-footer {
		padding-bottom: 8px;
	}

	.osram-bottom-nav {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		height: var(--osram-bottom-nav-offset);
		padding-bottom: var(--osram-bottom-nav-safe);
		background-color: color-mix(in srgb, var(--color-surface) 96%, transparent);
		border-top: 1px solid color-mix(in srgb, var(--color-text-primary) 8%, transparent);
		backdrop-filter: blur(20px) saturate(1.2);
		-webkit-backdrop-filter: blur(20px) saturate(1.2);
		box-shadow: 0 -8px 24px color-mix(in srgb, var(--color-text-primary) 6%, transparent);
	}

	.osram-bottom-nav__list {
		display: flex;
		align-items: stretch;
		justify-content: space-between;
		gap: 0;
		margin: 0 auto;
		padding: 0 4px;
		list-style: none;
		height: var(--osram-bottom-nav-height);
		max-width: 560px;
	}

	.osram-bottom-nav__slot {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
		padding: 0;
		display: flex;
	}

	.osram-bottom-nav__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		gap: 4px;
		box-sizing: border-box;
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 8px 2px 6px;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: var(--color-text-secondary);
		font: inherit;
		text-align: center;
		text-decoration: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: color var(--transition-fast) ease;
	}

	.osram-bottom-nav__item:hover,
	.osram-bottom-nav__item:focus {
		color: var(--color-text-primary);
		outline: none;
	}

	.osram-bottom-nav__item:focus-visible {
		border-radius: 10px;
		box-shadow: inset 0 0 0 2px var(--color-accent);
	}

	.osram-bottom-nav__item.is-active {
		color: var(--color-accent);
	}

	.osram-bottom-nav__icon {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 28px;
		width: 28px;
		height: 28px;
		margin: 0 auto;
	}

	.osram-bottom-nav__icon svg {
		display: block;
		width: 22px;
		height: 22px;
		stroke: currentColor;
		fill: none;
		stroke-width: 1.7;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.osram-bottom-nav__item.is-active .osram-bottom-nav__icon svg {
		stroke-width: 2;
	}

	.osram-bottom-nav__label {
		display: block;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		height: 14px;
		margin: 0;
		padding: 0 1px;
		overflow: hidden;
		font-family: var(--font-main);
		font-size: 11px;
		font-weight: 500;
		font-feature-settings: "kern" 1;
		letter-spacing: 0.04em;
		line-height: 14px;
		text-align: center;
		text-transform: uppercase;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.osram-bottom-nav__item.is-active .osram-bottom-nav__label {
		font-weight: 600;
	}

	.osram-bottom-nav__badge {
		position: absolute;
		top: -2px;
		right: -6px;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background-color: var(--color-performance);
		color: var(--color-surface);
		font-size: 10px;
		font-weight: 700;
		line-height: 16px;
		text-align: center;
	}

	/* ------------------------------------------------------------------
	   Float / fixed controls — lift above bottom nav (no overlap)
	   ------------------------------------------------------------------ */

	body.has-osram-bottom-nav .back-to-top,
	body.has-osram-bottom-nav .back-to-top.active,
	body.has-osram-bottom-nav #top-link,
	body.has-osram-bottom-nav .button.fixed.bottom,
	body.has-osram-bottom-nav a.button.fixed.bottom,
	body.has-osram-bottom-nav .fixed.bottom:not(.osram-bottom-nav):not(.sticky-add-to-cart):not(.sticky-add-to-cart--active),
	body.has-osram-bottom-nav .scroll-to-top,
	body.has-osram-bottom-nav .go-to-top,
	body.has-osram-bottom-nav .to-top,
	body.has-osram-bottom-nav .chat-button,
	body.has-osram-bottom-nav .hotline-phone,
	body.has-osram-bottom-nav .phone-floating,
	body.has-osram-bottom-nav .btn-call,
	body.has-osram-bottom-nav .btn-phone,
	body.has-osram-bottom-nav .call-now,
	body.has-osram-bottom-nav .floating-btn,
	body.has-osram-bottom-nav .floating-button,
	body.has-osram-bottom-nav .float-button,
	body.has-osram-bottom-nav .float-contact,
	body.has-osram-bottom-nav .contact-float,
	body.has-osram-bottom-nav .fixed-contact,
	body.has-osram-bottom-nav .fab-container,
	body.has-osram-bottom-nav .fab-container-right,
	body.has-osram-bottom-nav .fab-container-left,
	body.has-osram-bottom-nav .zalo-chat-widget,
	body.has-osram-bottom-nav .zalo-float,
	body.has-osram-bottom-nav #zalo-chat-widget,
	body.has-osram-bottom-nav .fb-customerchat,
	body.has-osram-bottom-nav .fb_dialog,
	body.has-osram-bottom-nav iframe.fb_customer_chat_bounce_in_v2,
	body.has-osram-bottom-nav .crisp-client .cc-1xryu,
	body.has-osram-bottom-nav #tidio-chat,
	body.has-osram-bottom-nav #tidio-chat iframe,
	body.has-osram-bottom-nav .woofunnels-bubble,
	body.has-osram-bottom-nav .wpcf7-floating {
		bottom: var(--osram-float-clearance) !important;
	}

	/* Full-width sticky ATC sits flush on top of the nav bar */
	body.has-osram-bottom-nav .sticky-add-to-cart,
	body.has-osram-bottom-nav .sticky-add-to-cart--active {
		bottom: var(--osram-bottom-nav-offset) !important;
	}

	/* Stacked float columns (common Zalo/Phone widgets) */
	body.has-osram-bottom-nav .fixed-list,
	body.has-osram-bottom-nav .social-icons.fixed,
	body.has-osram-bottom-nav .support-online,
	body.has-osram-bottom-nav .coccoc-alo-phone,
	body.has-osram-bottom-nav .phonering-alo-phone,
	body.has-osram-bottom-nav .quick-alo-phone,
	body.has-osram-bottom-nav [class*="float-"][style*="bottom"],
	body.has-osram-bottom-nav [class*="floating"][style*="bottom"],
	body.has-osram-bottom-nav [id*="float"][style*="bottom"] {
		bottom: var(--osram-float-clearance) !important;
	}

	/* Footer absolute bar — avoid double crowding with bottom nav */
	body.has-osram-bottom-nav .absolute-footer {
		font-size: 12px;
	}
}

@media (min-width: 850px) {
	.osram-bottom-nav {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.osram-bottom-nav__item {
		transition: none;
	}
}
