/*	–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
	CORE/NAVBAR/CLASSES.CSS
	––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */

/**
 * VISIOFRAMEWORK
 * This file is part of VISIOFRAMEWORK.
 * @package		visioframework
 * @author		Agência Visio <contato@agenciavisio.com.br>
 * @copyright	Copyright (c) 2023-present. M. Souza & Souza LTDA. (CNPJ: 21.284.748/0001-33). All rights reserved.
 * @license		Proprietary
 * @link		https://www.agenciavisio.com.br
 */

.navbar--inner {
	z-index		: 1000;
	transition	: opacity 0.15s linear, visibility 0s linear;
}

/*	Hides state-sensitive elements whenever topbar state doesn't match */
.navbar--outer:not(.state-default) .navbar--inner.when-default,
.navbar--outer:not(.state-scrolled) .navbar--inner.when-scrolled,
.navbar--outer:not(.state-with-offcanvas) .navbar--inner.when-with-offcanvas {
	opacity				: 0			!important;
	pointer-events		: none		!important;
	/*	The states are stacked copies, so fading both at the same rate drops the
		combined backdrop alpha mid-swap and reads as a flash: the incoming state
		fades in fast while the outgoing one lingers opaque underneath it. */
	visibility			: hidden	!important;
	transition-duration	: 0.4s, 0s	!important;
	transition-delay	: 0s, 0.4s	!important;
}

/*	Hide on scroll down. The shown bar is `transform: none`: any other value, translateY(0) and will-change
	included, makes it the containing block of its fixed offcanvas, which then shrinks to the bar's height. */
.navbar--outer[data-navbar-scroll='hide-on-scroll-down'] {
	transition	: transform 0.25s ease-out;
}

/*	3rem past the bar: a shadow of its own reaches about 42px below it (Glow and DropShadow _5) */
.navbar--outer[data-navbar-scroll='hide-on-scroll-down'].navbar--hidden {
	transform	: translateY(calc(-100% - 3rem));
}

/*	The menu opens on a bar already in place: mid-slide, the transform would still hold the offcanvas */
.navbar--outer[data-navbar-scroll='hide-on-scroll-down'].state-with-offcanvas {
	transition	: none;
}

@media (prefers-reduced-motion: reduce) {
	.navbar--outer[data-navbar-scroll='hide-on-scroll-down'] {
		transition	: none;
	}
}

/*	 */
.navbar-state--wrapper.border {
	border-top		: none	!important;
	border-left		: none	!important;
	border-right	: none	!important;
}

.navbar--offcanvas--outer.offcanvas {
	background-color: transparent !important;
	/*	Bootstrap's `.offcanvas` base anchors only `bottom`; `top` comes from the
		placement classes, which this offcanvas doesn't use. Anchoring both ends
		also sizes the box to the visible viewport, which mobile `vh` overshoots. */
	top				: 0;
}

/*	The navbar chrome paints over the offcanvas, so the menu has to center in
	what it leaves free. `--navbar-offcanvas-inset` is written by the navbar's
	JavaScript: the height varies per site, per state and with scroll. */
.navbar--offcanvas--inner {
	padding-top: var(--navbar-offcanvas-inset, 0px);
}

/*	Scrolls the container rather than the inner: the inner hosts the backdrop,
	which is absolute and would scroll away from the surface it paints. */
.navbar--offcanvas--container {
	max-height	: 100%;
	/*	Stated because a scrolling value on one axis coerces the other's
		`visible` to `auto`, and a vertical menu must not scroll sideways.
		`clip` would be coerced to `hidden` here — the box already scrolls. */
	overflow-x	: hidden;
	overflow-y	: auto;
}

.navbar--offcanvas--outer.offcanvas.showing {
	transition: var(--bs-offcanvas-transition), opacity 0.33s linear !important;
}

.navbar--offcanvas--outer.offcanvas.show.hiding {
	transition: var(--bs-offcanvas-transition), opacity 0.33s linear !important;
}

.navbar--offcanvas--outer.offcanvas.show.hiding,
.navbar--offcanvas--outer.offcanvas:not(.show, .showing) {
	opacity: 0 !important;
}

.navbar--offcanvas--outer.offcanvas.show,
.navbar--offcanvas--outer.offcanvas.showing {
	opacity: 1 !important;
}