/**
 * GC Theme — Mobile Drawer
 *
 * Slide-in mobile menu, triggered by the hamburger
 * in components/header.css. Includes overlay backdrop,
 * search field, primary nav links, and footer info.
 *
 * @package GC_Theme
 */

.mobile-drawer {
position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: var(--gc-bg);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@media (max-width: 768px) {
.nav-toggle { display: flex; }
    .header-right { display: none !important; }
    .header-top-bar { display: none; }
    .mobile-drawer-overlay { display: block; }
}

.mobile-drawer.is-open {
     transform: translateY(0);
    visibility: visible;
}

.mobile-drawer-overlay.is-active {
      opacity: 1;
    pointer-events: auto;
}



/* Drawer header */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gc-border);
}



.mobile-drawer-header .site-branding img {
    max-height: 32px;
    width: auto;
}

.mobile-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gc-text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.mobile-drawer-close:hover {
    background: var(--gc-bg-soft);
    color: var(--gc-primary);
}

/* Drawer search */
.mobile-drawer-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gc-border);
}

.mobile-drawer-search form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gc-bg-soft);
    border: 1px solid var(--gc-border);
    border-radius: 8px;
    padding: 10px 14px;
}

.mobile-drawer-search svg {
    color: var(--gc-text-faint);
    flex-shrink: 0;
}

.mobile-drawer-search input[type="search"] {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--gc-text);
    width: 100%;
}

/* Primary nav in drawer */
.mobile-drawer-nav {
    padding: 8px 0;
}

.mobile-drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-drawer-nav ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--gc-text);
    text-decoration: none;
    border-bottom: 1px solid var(--gc-bg-softer);
    transition: color 0.2s, background 0.2s;
}

.mobile-drawer-nav ul li a:hover {
    color: var(--gc-primary);
    background: var(--gc-primary-soft);
}

/* Submenu arrow */
.mobile-drawer-nav ul li.menu-item-has-children > a::after {
    content: '›';
    font-size: 20px;
    color: var(--gc-text-faint);
    transition: transform 0.2s;
    display: inline-block;
}

.mobile-drawer-nav ul li.menu-item-has-children.submenu-open > a::after {
    transform: rotate(90deg);
}

/* Submenu */
.mobile-drawer-nav ul li ul {
    display: none;
    background: var(--gc-bg-soft);
    padding: 4px 0;
}

.mobile-drawer-nav ul li.submenu-open > ul {
    display: block;
}

.mobile-drawer-nav ul li ul li a {
    padding: 12px 20px 12px 36px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gc-text-muted);
}

/* Divider */
.mobile-drawer-divider {
    height: 1px;
    background: var(--gc-border);
    margin: 8px 20px;
}

/* Secondary nav (top-bar items) */
.mobile-drawer-secondary {
    padding: 8px 0 24px;
}

.mobile-drawer-secondary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-drawer-secondary ul li a {
    display: block;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gc-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-drawer-secondary ul li a:hover {
    color: var(--gc-primary);
}

