/* Mobile fixes for the mirrored Blocksy pages. Loaded on every page by src/lib/optimize-html.js.
   Everything here is scoped to phone widths, so desktop keeps the original theme styles. */

@media (max-width: 767px) {
	/* Hamburger: the icon is 18px, so give the button a 44px hit area. */
	button.ct-header-trigger {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Text-style CTAs ("Mais informações →") rendered 23px tall. */
	a.elementor-button-link {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	/* Footer links and the logo rendered about 17px and 30px tall. */
	footer a,
	a.site-logo-container {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	/* Off-canvas drawer, opened by mobile-fixes.js. The theme keeps it display:none until its own script runs. */
	#offcanvas.ct-panel.is-open {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 999999;
		opacity: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: #000;
		padding: 72px 24px 40px;
	}

	#offcanvas.ct-panel.is-open a {
		display: block;
		min-height: 44px;
		padding: 10px 0;
		color: #fff;
		font-size: 17px;
		line-height: 1.4;
		text-decoration: none;
	}

	/* The theme sets pointer-events:none on the closed panel, which swallows touches once it is open. */
	#offcanvas.ct-panel.is-open,
	#offcanvas.ct-panel.is-open * {
		pointer-events: auto;
	}

	/* Submenus open when their chevron is tapped (see mobile-fixes.js). */
	#offcanvas .ct-toggle-dropdown-mobile {
		min-width: 44px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: 0;
		color: #fff;
		cursor: pointer;
	}

	#offcanvas .menu-item-has-children.is-expanded > ul.sub-menu {
		display: block;
		visibility: visible;
		opacity: 1;
		height: auto;
		max-height: none;
		position: static;
		padding-left: 16px;
	}

	#offcanvas .sub-menu a {
		font-size: 16px;
	}

	#offcanvas.ct-panel.is-open .ct-toggle-close {
		position: absolute;
		top: 12px;
		right: 12px;
		width: 44px;
		height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: 0;
		color: #fff;
		cursor: pointer;
	}
}
