/*
 * ALMAZA-001.3 — site chrome on the approved identity: header logo, menu toggle, footer logo, mobile call bar.
 * Loaded after every theme stylesheet (inc/custom.php). Uses css/almaza-tokens.css.
 * Menu links, their order and behaviour are unchanged.
 */

/* ---------- Header logo (SVG, aspect 1850:590) ---------- */
.mainNav .navbar-brand {
	width: auto;
	height: 72px;
	padding: 8px 0;
	margin: 0;
}

.mainNav .navbar-brand .logo {
	display: block;
	width: auto;
	height: 56px;
	max-width: none;
	margin: 0;
	object-fit: contain;
}

@media (max-width: 991.98px) {
	.mainNav .navbar-brand {
		height: 64px;
	}

	.mainNav .navbar-brand .logo {
		height: 48px; /* brief: about 48px on mobile */
	}
}

@media (max-width: 359.98px) {
	.mainNav .navbar-brand .logo {
		height: 42px; /* 320px screens: keeps the toggle beside the logo */
	}
}

/* ---------- Menu toggle: 44px touch target, visible focus ---------- */
.mainNav .navbar-toggler {
	min-width: 44px;
	min-height: 44px;
	padding: 6px 8px;
	border: 1px solid var(--alm-c-border, #dce5f1);
	border-radius: var(--alm-r-btn, 12px);
}

.mainNav .navbar-toggler:focus {
	box-shadow: none;
}

.mainNav .navbar-toggler:focus-visible,
.mainNav .navbar-brand:focus-visible {
	outline: 3px solid var(--alm-c-focus, #034296);
	outline-offset: 3px;
}

/* ---------- Footer logo: the reverse SVG is drawn for #0A1F44, so no filter ---------- */
.almaza-footer-logo {
	width: 200px;
	max-width: 100%;
	height: auto;
	filter: none;
}

/* ---------- Mobile call bar (inc/custom.php almaza_floating_cta) ---------- */
@media (max-width: 768px) {
	.almaza-mobile-cta-bar {
		height: auto;
		min-height: var(--alm-bar-h, 68px);
		gap: 10px;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
		background: var(--alm-c-surface, #fff);
		border-top: 1px solid var(--alm-c-border, #dce5f1);
		box-shadow: 0 -6px 20px rgba(10, 31, 68, 0.08);
	}

	.almaza-mobile-cta-call,
	.almaza-mobile-cta-whatsapp {
		height: auto;
		min-height: var(--alm-btn-h-touch, 52px);
		border-radius: var(--alm-r-btn, 12px);
		font-family: var(--alm-f-body, "Almarai", sans-serif);
		font-size: 1rem;
		gap: 8px;
	}

	.almaza-mobile-cta-call {
		background-color: var(--alm-c-action, #206dbf);
		color: #fff;
	}

	/* WhatsApp: navy text on green (8.19:1); white on green is 1.98:1. */
	.almaza-mobile-cta-whatsapp,
	.almaza-mobile-cta-whatsapp:hover,
	.almaza-mobile-cta-whatsapp:focus {
		background-color: var(--alm-c-wa, #25d366);
		color: var(--alm-c-navy, #0a1f44);
	}

	.almaza-mobile-cta-call:hover,
	.almaza-mobile-cta-call:focus {
		background-color: var(--alm-c-action-700, #15549e);
		color: #fff;
		opacity: 1;
	}

	.almaza-mobile-cta-whatsapp:hover {
		background-color: var(--alm-c-wa-hover, #22c25e);
		opacity: 1;
	}

	.almaza-mobile-cta-call:focus-visible,
	.almaza-mobile-cta-whatsapp:focus-visible {
		outline: 3px solid var(--alm-c-focus, #034296);
		outline-offset: 2px;
	}

	/* Keep the last content clear of the bar. */
	body {
		padding-bottom: calc(var(--alm-bar-h, 68px) + env(safe-area-inset-bottom, 0px) + 8px);
	}

	/* The floating WhatsApp button repeats the bar's WhatsApp button on mobile. */
	.almaza-floating-whatsapp {
		display: none;
	}
}
