/* =============================================================================
 * BASELINE — KMA CSS MODULE 99 — FOOTER LAYOUT & STICKY FOOTER BEHAVIOR
 * =============================================================================
 *
 * File: /css/99-footer-layout.css
 * Module: KMA CSS MODULE 99 — FOOTER LAYOUT & STICKY FOOTER BEHAVIOR
 * Version: 1.0
 * Last Updated: 2026-03-22
 *
 * PURPOSE
 * -------
 * Controls global layout behavior required to:
 * - Keep the footer anchored to the bottom of the viewport on short pages
 * - Ensure main content expands correctly within a flex-based page structure
 * - Reduce excessive vertical spacing in Elementor footer templates
 *
 * SCOPE
 * -----
 * Targets:
 * - html, body (global layout foundation)
 * - Core content wrappers (#content, .site-content, Elementor locations)
 * - Footer containers (footer, .site-footer, .elementor-location-footer)
 *
 * DESIGN RULES
 * ------------
 * - Layout only (no colors, typography, or visual styling)
 * - Must be LAST in enqueue order to ensure predictable layout overrides
 * - Must support Elementor header/footer templates
 *
 * NOTES
 * -----
 * - Uses flexbox to create sticky footer behavior
 * - Includes Elementor-specific fixes for template-based layouts
 * - Contains optional (commented) footer padding reduction block
 *
 * =============================================================================
 */


/* ============================================================================
   01 — GLOBAL STICKY FOOTER FOUNDATION
   ============================================================================ */

html,
body {
	height: 100%;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}


/* ============================================================================
   02 — MAIN CONTENT FLEX GROWTH
   ============================================================================ */

#content,
.site-content,
.elementor-location-single,
.elementor-location-archive {
	flex: 1 0 auto;
}


/* ============================================================================
   03 — FOOTER ANCHORING
   ============================================================================ */

footer,
.site-footer,
.elementor-location-footer {
	flex-shrink: 0;
}


/* ============================================================================
   04 — OPTIONAL FOOTER PADDING REDUCTION (COMMENTED)
   ============================================================================ */

/*
.elementor-location-footer .e-con,
.elementor-location-footer .elementor-section {
	padding-top: 24px !important;
	padding-bottom: 24px !important;
}
*/


/* ============================================================================
   05 — FOOTER INTERNAL SPACING NORMALIZATION
   ============================================================================ */

.elementor-location-footer .elementor-widget-wrap {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}


/* ============================================================================
   06 — ELEMENTOR TEMPLATE FIX (HEADER/FOOTER LAYOUT)
   ============================================================================ */

body.page-template-elementor_header_footer > [data-elementor-type="wp-page"] {
	flex: 1 0 auto;
}

body.page-template-elementor_header_footer > footer {
	margin-top: auto;
}


/* ============================================================================
   07 — CONDITIONAL FOOTER NOTICES (LOGGED OUT USERS)
   ============================================================================ */

body:not(.logged-in) .km-footer-notices {
	display: none !important;
}


/* ============================================================================
   END OF MODULE 99
   ============================================================================ */