﻿/*
 * wp-overrides.css
 * WordPress-specific fixes for MSI Platform Landing theme.
 */

/* ── Mobile nav drawer: full-height fix ────────────────────────────────────
   On WordPress, html { margin-top: 32px } (admin bar) can affect bottom: 0
   calculations on some mobile browsers. We force explicit height instead.
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links {
        height: 100vh;
        height: 100dvh; /* dynamic viewport height — accounts for mobile browser chrome */
        top: 0;
        bottom: auto; /* let height handle it instead of bottom: 0 */
    }
}

/* ── Admin bar compatibility (logged-in users only) ────────────────────── */
.admin-bar .nav-links {
    top: 46px; /* mobile admin bar = 46px */
    height: calc(100vh - 46px);
    height: calc(100dvh - 46px);
}

@media screen and (min-width: 601px) {
    .admin-bar .nav-links {
        top: 32px; /* desktop admin bar = 32px */
        height: calc(100vh - 32px);
        height: calc(100dvh - 32px);
    }
}

/* ── Overlay full cover (same fix) ─────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-overlay {
        top: 0;
        height: 100vh;
        height: 100dvh;
    }
    .admin-bar .nav-overlay {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* ── Prevent WordPress block styles from resetting our box-sizing ───────── */
*, *::before, *::after {
    box-sizing: border-box;
}
