/* RMM Child header — lifted from gg-theme.
 *
 * Brand tokens: reads --gg-colour-primary (emitted by mu-plugins/gg-brand-css.php).
 * Falls back to legacy --gg-primary if that ever lands here.
 * Sharp corners enforced (border-radius: 0) per /root/rmm-wordpress/CLAUDE.md.
 */

:root {
    /* Local fallbacks for layout vars that gg-brand-css doesn't emit. */
    --gg-max-width: 1200px;
    --gg-header-height: 84px;
}

.gg-header {
    background: var(--gg-colour-primary, var(--gg-primary, #091D2D));
    height: var(--gg-header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gg-header-inner {
    max-width: var(--gg-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gg-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.gg-logo-img {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

.gg-logo-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gg-logo-text {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gg-logo-strapline {
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.gg-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gg-nav a {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.gg-nav-link {
    cursor: pointer;
}

.gg-nav a:hover,
.gg-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Dropdowns */
.gg-nav-dropdown {
    position: relative;
}
.gg-nav-has-dd {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.gg-dd-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.gg-nav-dd-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--gg-colour-primary, var(--gg-primary, #091D2D));
    border-radius: 0;
    padding: 6px 0;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1001;
}
.gg-nav-dropdown:hover .gg-nav-dd-menu,
.gg-nav-dropdown.open .gg-nav-dd-menu {
    display: block;
}
.gg-nav-dropdown:hover .gg-dd-arrow,
.gg-nav-dropdown.open .gg-dd-arrow {
    transform: rotate(180deg);
}
.gg-nav-dd-item {
    display: block;
    padding: 8px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.gg-nav-dd-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.gg-nav-dd-item.has-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 14px;
}
.gg-nav-dd-item.has-icon .gg-nav-dd-icon { color: rgba(255,255,255,0.55); transition: color 0.15s; }
.gg-nav-dd-item.has-icon:hover .gg-nav-dd-icon,
.gg-nav-dd-item.has-icon.is-current .gg-nav-dd-icon { color: #faf089; }

.gg-nav-dd-menu.has-current .gg-nav-dd-item:not(.is-current) {
    opacity: 0.45;
    transition: opacity 0.15s;
}
.gg-nav-dd-menu.has-current .gg-nav-dd-item:not(.is-current):hover {
    opacity: 0.9;
}
.gg-nav-dd-item.is-current {
    color: #faf089;
    font-weight: 600;
    background: rgba(250, 240, 137, 0.08);
    border-left: 3px solid #faf089;
    padding-left: 15px;
}
.gg-nav-dd-item.is-current:hover {
    background: rgba(250, 240, 137, 0.15);
    color: #fff;
}

.gg-nav-dd-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.gg-nav-dd-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin: 4px 18px;
}

/* Nested submenu */
.gg-nav-dd-subwrap {
    position: relative;
}
.gg-nav-dd-has-sub {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gg-dd-arrow-right {
    flex-shrink: 0;
    opacity: 0.7;
}
.gg-nav-dd-submenu {
    display: none;
    position: absolute;
    top: -6px;
    left: 100%;
    background: var(--gg-colour-primary, var(--gg-primary, #091D2D));
    border-radius: 0;
    padding: 6px 0;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1002;
}
.gg-nav-dd-subwrap:hover > .gg-nav-dd-submenu,
.gg-nav-dd-subwrap.open > .gg-nav-dd-submenu {
    display: block;
}
.gg-nav-dd-subwrap:hover > .gg-nav-dd-has-sub {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Mobile menu */
.gg-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.gg-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .gg-logo-strapline {
        display: none;
    }

    .gg-menu-toggle {
        display: block;
    }

    .gg-nav {
        display: none;
        position: absolute;
        top: var(--gg-header-height);
        left: 0;
        right: 0;
        background: var(--gg-colour-primary, var(--gg-primary, #091D2D));
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .gg-nav.open {
        display: flex;
    }

    .gg-nav a {
        display: block;
        padding: 12px 14px;
    }

    .gg-nav-dropdown {
        width: 100%;
    }
    .gg-nav-dd-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 16px;
        min-width: 0;
    }
    .gg-nav-dropdown:hover .gg-nav-dd-menu,
    .gg-nav-dropdown.open .gg-nav-dd-menu {
        display: block;
    }
    .gg-nav-dd-item {
        padding: 10px 14px;
    }
    .gg-nav-dd-submenu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 16px;
        min-width: 0;
        display: block;
    }
    .gg-dd-arrow-right {
        display: none;
    }
}

/* When WP admin bar is showing */
.admin-bar .gg-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .gg-header {
        top: 46px;
    }
}
