/*
Theme Name: DGIT Brand
Theme URI: https://dgit.ng
Description: DGIT (Dynamic Global Innovative Technology) Nigerian Limited flagship brand child theme. Applies the locked navy/gold identity to WordPress installs on dgit.ng and property.dgit.ng. Child of Twenty Twenty-Five.
Author: DGIT
Template: twentytwentyfive
Version: 1.5.0
Text Domain: dgit-brand
*/

/*
CHANGELOG
v1.5.0 (2026-09-07) — Added "Blog" link to shared header nav (dgit.ng/blog/)
v1.4.0 (2026-09-06) — Simplified Tenant Dashboard exit link to single
                       logout+redirect-home shortcode; removed separate
                       gold Log In/Log Out button; added 15-min idle
                       auto-logout site-wide for logged-in visitors
v1.3.0 (2026-09-06) — Mobile nav overlay: fixed clipped text, flush-right
                       anchor, transparent backdrop (page visible behind
                       panel), trimmed to fit-content width/height,
                       cleared sticky header so all links visible
v1.2.0 (2026-09-06) — Added "No Page Title" template (suppresses default
                       Page Title block); added gold Log In/Log Out
                       button to Tenant Dashboard bar (later replaced
                       in v1.4.0)
v1.1.0 (2026-09-04) — Added "No Navigation (Tenant Dashboard)" template
                       and minimal top bar part; rebalanced footer to
                       centered layout (was right-aligned/lopsided)
v1.0.0 (2026-09-04) — Initial build: navy/gold palette, Fraunces/Inter/
                       IBM Plex Mono typography, sticky header, footer
                       with division links and copyright line
*/

/* All visual overrides live in theme.json (block-theme standard) and this file's
   small set of non-block-editor touches below (e.g. focus states, print styles). */

/* Visible keyboard focus, kept consistent with brand gold accent */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid #B8952E;
	outline-offset: 2px;
}

/* Mobile nav overlay: compact panel anchored top-right, not a full-screen
   opaque takeover. Background stays translucent navy (set on the block
   itself via customOverlayBackgroundColor) so the page reads through. */
@media (max-width: 782px) {
	/* Remove background from outer container so the real page shows
	   through everywhere except the panel itself */
	.wp-block-navigation__responsive-container.is-menu-open {
		background: transparent !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* The dialog panel itself — sized to fit its content (no wider or
	   taller than the links themselves), anchored top-right, cleared
	   below the sticky header so the first link isn't hidden behind it */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
		width: max-content !important;
		max-width: 80vw !important;
		min-width: 140px !important;
		height: auto !important;
		max-height: 85vh !important;
		inset: 0 0 auto auto !important;
		top: 4rem !important;
		right: 0 !important;
		left: auto !important;
		border-radius: 0 0 0 12px !important;
		overflow-y: auto !important;
		box-shadow: -6px 6px 24px rgba(0, 0, 0, 0.35);
		background-color: rgba(16, 25, 43, 0.85) !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Inner content wrapper — reset from its full-viewport assumption so
	   text isn't clipped, but without forcing full width so the panel
	   can still shrink to fit its content */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		transform: none !important;
		width: auto !important;
		max-width: none !important;
		box-sizing: border-box !important;
		padding: 2.5rem 1.25rem 1rem !important;
		position: relative !important;
		left: 0 !important;
		right: 0 !important;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
	}

	/* Close button stays reachable inside the smaller panel */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		position: absolute !important;
		top: 8px !important;
		right: 8px !important;
		z-index: 1000 !important;
		color: #FFFFFF !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	/* Text color */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog * {
		color: #FFFFFF !important;
	}

	/* If WordPress renders this as a native <dialog>, its ::backdrop
	   pseudo-element also needs to be transparent */
	.wp-block-navigation__responsive-container.is-menu-open::backdrop {
		background: transparent !important;
	}
}

/* Respect reduced motion preference site-wide */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
