
/*
 * UKMagz Shared Menu
 * Matches the approved homepage navigation.
 */

body.ukmagz-has-shared-menu {
    background: #f6f8fc;
}

/* Hide navigation bars previously embedded by individual tool plugins. */
body.ukmagz-has-shared-menu .ukgpm-appbar,
body.ukmagz-has-shared-menu .ukmagz-workspace-nav,
body.ukmagz-has-shared-menu .ukh-topbar {
    display: none !important;
}

/* Hide common theme page headers/title banners on tool pages. */
body.ukmagz-has-shared-menu .entry-header,
body.ukmagz-has-shared-menu .page-header,
body.ukmagz-has-shared-menu .page-title,
body.ukmagz-has-shared-menu .entry-title,
body.ukmagz-has-shared-menu .wp-block-post-title,
body.ukmagz-has-shared-menu .page-banner,
body.ukmagz-has-shared-menu .page-hero,
body.ukmagz-has-shared-menu main > article > header {
    display: none !important;
}

.ukmagz-shared-menu {
    position: relative;
    z-index: 9990;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5ebf4;
    box-sizing: border-box;
}

.admin-bar .ukmagz-shared-menu {
    top: 0;
}

.ukmagz-shared-menu-inner {
    width: min(1180px, calc(100% - 36px));
    min-height: 106px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: center;
}

.ukmagz-shared-brand {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    color: #0b1733 !important;
    text-decoration: none !important;
    line-height: 1;
}

.ukmagz-shared-brand strong {
    color: #111a2e;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: -1.2px;
}

.ukmagz-shared-brand strong span {
    color: #1769ff;
}

.ukmagz-shared-brand small {
    color: #34425b;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.ukmagz-shared-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 33px;
}

.ukmagz-shared-links a {
    position: relative;
    padding: 15px 0;
    color: #172036 !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 750;
    white-space: nowrap;
}

.ukmagz-shared-links a:hover,
.ukmagz-shared-links a.is-current {
    color: #1769ff !important;
}

.ukmagz-shared-links a.is-current::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    background: #1769ff;
}

/*
 * Full-width compatibility:
 * wp_body_open renders outside most plugin content containers,
 * so the shared menu stays aligned consistently.
 */
body.ukmagz-has-shared-menu .site-content,
body.ukmagz-has-shared-menu .content-area,
body.ukmagz-has-shared-menu .site-main,
body.ukmagz-has-shared-menu main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 1000px) {
    .ukmagz-shared-menu-inner {
        grid-template-columns: 220px 1fr;
    }

    .ukmagz-shared-links {
        gap: 20px;
    }

    .ukmagz-shared-links a {
        font-size: 13px;
    }
}

@media (max-width: 760px) {
    .ukmagz-shared-menu-inner {
        grid-template-columns: 1fr;
        gap: 13px;
        min-height: auto;
        padding: 20px 0;
    }

    .ukmagz-shared-links {
        justify-content: flex-start;
        gap: 8px 18px;
        flex-wrap: wrap;
    }

    .ukmagz-shared-links a {
        padding: 5px 0;
        font-size: 13px;
    }

    .ukmagz-shared-links a.is-current::after {
        display: none;
    }
}


/* v0.1.1 — suppress legacy headers on tool pages */
body.ukmagz-has-shared-menu #masthead,
body.ukmagz-has-shared-menu .site-header,
body.ukmagz-has-shared-menu header.wp-block-template-part,
body.ukmagz-has-shared-menu .wp-site-blocks > header,
body.ukmagz-has-shared-menu .ukmagz-employee-nav,
body.ukmagz-has-shared-menu .ukmagz-employee-header,
body.ukmagz-has-shared-menu .employee-work-header,
body.ukmagz-has-shared-menu .employee-work-nav {
    display: none !important;
}

/* Never hide the centralized menu itself. */
body.ukmagz-has-shared-menu .ukmagz-shared-menu {
    display: block !important;
}


/* v0.1.2 SAFE HOTFIX
 * Never hide arbitrary DIVs or parent containers.
 * Only suppress known navigation/header elements.
 */

/* Guest Posting's older embedded menu. */
body.ukmagz-tool-guest-posting .ukgpm-appbar {
    display: none !important;
}

/* Bulk Article Generator's older embedded menu. */
body.ukmagz-tool-bulk-article-generator .ukmagz-workspace-nav {
    display: none !important;
}

/* Common WordPress/theme header on Website Status. */
body.ukmagz-tool-website-status #masthead,
body.ukmagz-tool-website-status .site-header,
body.ukmagz-tool-website-status header.site-header,
body.ukmagz-tool-website-status .wp-site-blocks > header {
    display: none !important;
}

/*
 * Employee Work:
 * only known menu/header class names are suppressed.
 * No generic div/header scanning is used, so task content stays visible.
 */
body.ukmagz-tool-employee-work .ukmagz-employee-nav,
body.ukmagz-tool-employee-work .ukmagz-employee-header,
body.ukmagz-tool-employee-work .employee-work-nav,
body.ukmagz-tool-employee-work .employee-work-header {
    display: none !important;
}

/* Ensure tool content itself can never be hidden by the shared-menu plugin. */
body.ukmagz-has-shared-menu .ukgpm-wrap,
body.ukmagz-has-shared-menu .ukmagz-ag-wrap,
body.ukmagz-has-shared-menu #ukmagz-bulk-bulk-article-generator {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
