/**
 * 
 * Copyright (c) 2026 Estait Group LLC
 * All rights reserved.
 */

/* Network Templates - Material Design Styles */

:root {
    --mdc-theme-primary: #B39DDB;  /* Light purple for header */
    --mdc-theme-secondary: #9575CD;  /* Medium purple accent */
    --mdc-theme-background: #ffffff;  /* White background */
    --mdc-theme-surface: #F5F5F5;  /* Light grey surface */
    --mdc-theme-on-primary: #ffffff;
    --mdc-theme-on-secondary: #ffffff;
    --network-footer-bg: #B39DDB;  /* Match header color */
    --network-footer-text: #ffffff;  /* White text */
    --border-radius: 8px;  /* Rounded edges */
}

/* Global rounded edges */
.mdc-card,
.network-header,
.network-footer,
button,
.mdc-button,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
img {
    border-radius: var(--border-radius) !important;
}

/* Override WordPress theme dark colors for better visibility */
body {
    background-color: var(--mdc-theme-background) !important;
    color: #424242 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #7E57C2 !important;
}

a {
    color: #9575CD !important;
}

a:hover {
    color: #B39DDB !important;
}

/* Header Styles */
.network-header {
    background-color: var(--mdc-theme-primary);
    color: var(--mdc-theme-on-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* Hide mobile menu button globally */
.mdc-top-app-bar__navigation-icon,
#menu-button {
    display: none !important;
    visibility: hidden !important;
}

/* Always show desktop navigation */
.network-header__desktop-nav {
    display: flex !important;
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 64px; /* Adjust based on actual header height */
}

.network-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.network-header__logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.network-header__title {
    font-size: 20px;
    font-weight: 500;
    color: var(--mdc-theme-on-primary);
}

.network-header__desktop-nav {
    display: none;
}

.network-header__nav {
    display: flex;
    align-items: center;
}

.network-header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.network-header__menu-item {
    position: relative;
}

.network-header__menu-link {
    color: var(--mdc-theme-on-primary) !important;
    text-transform: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    display: flex;
    align-items: center;
}

.network-header__dropdown-icon {
    font-size: 18px;
    margin-left: 4px;
}

.network-header__menu-item--active .network-header__menu-link {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Multi-level dropdown support */
.network-header__menu-item {
    position: relative;
}

.network-header__menu-item.has-submenu > .network-header__menu-link {
    cursor: pointer;
}

.network-header__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 8px 0;
    list-style: none;
    z-index: 1000;
}

/* Second level submenu positioning */
.network-header__submenu .network-header__submenu {
    top: 0;
    left: 100%;
    margin-left: 4px;
}

.network-header__menu-item:hover > .network-header__submenu {
    display: block;
}

.network-header__submenu .network-header__menu-item {
    display: block;
}

.network-header__submenu .network-header__menu-link {
    color: var(--mdc-theme-primary) !important;
    display: block;
    padding: 12px 20px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.network-header__submenu .network-header__menu-link:hover {
    background-color: rgba(155, 89, 182, 0.08);
}

/* Ensure Home is always first */
.network-header__menu .menu-item-home {
    order: -1;
}

/* Mobile Drawer Styles - COMPLETELY HIDDEN */
.network-drawer {
    display: none !important;
    visibility: hidden !important;
}

.mdc-drawer--modal {
    display: none !important;
    visibility: hidden !important;
}

.mdc-drawer-scrim {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.network-drawer .mdc-drawer__header {
    background-color: var(--mdc-theme-primary);
    color: var(--mdc-theme-on-primary);
    padding: 24px 16px;
}

.network-drawer .mdc-drawer__title {
    color: var(--mdc-theme-on-primary);
    margin: 0;
}

.network-drawer .mdc-drawer__subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin: 4px 0 0;
}

.network-drawer .mdc-list-item {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.87);
}

.network-drawer .mdc-list-item--activated {
    color: var(--mdc-theme-primary);
    background-color: rgba(155, 89, 182, 0.08);
}

/* Footer Styles */
.network-footer {
    background-color: var(--network-footer-bg);
    color: var(--network-footer-text);
    padding: 24px;
    margin-top: 64px;
}

.network-footer__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.network-footer__nav {
    flex: 1;
}

.network-footer__title {
    color: var(--network-footer-text);
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 500;
    text-align: left;
}

.network-footer__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.network-footer__link {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.network-footer__link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.network-footer__social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.network-footer__subtitle {
    color: var(--network-footer-text);
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.network-footer__social-links {
    display: flex;
    gap: 8px;
}

.network-footer__social-links .mdc-icon-button {
    color: #ffffff;
    transition: background-color 0.2s;
}

.network-footer__social-links .mdc-icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.network-footer__bottom {
    margin-left: auto;
    text-align: right;
}

.network-footer__bottom p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 767px) {
    /* Mobile: hide menu button completely, show desktop nav */
    .mdc-top-app-bar__navigation-icon {
        display: none !important;
    }
    
    .network-header__desktop-nav {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    /* Desktop: hide menu button, show desktop nav */
    .network-header .mdc-top-app-bar__navigation-icon {
        display: none !important;
    }
    
    .network-header__desktop-nav {
        display: flex !important;
    }
    
    /* Desktop: ensure drawer never shows */
    .mdc-drawer--modal {
        display: none !important;
    }
    
    .mdc-drawer-scrim {
        display: none !important;
    }
    
    .network-footer__container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .network-footer__bottom {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .network-header__logo {
        height: 48px;
    }
    
    .network-header__title {
        font-size: 24px;
    }
    
    .network-footer__container {
        grid-template-columns: 2fr 1fr;
    }
    
    .network-footer__menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* Material Design Adjustments */
.mdc-top-app-bar__navigation-icon {
    color: var(--mdc-theme-on-primary);
}

.mdc-drawer-scrim {
    z-index: 150;
}

/* Ensure proper spacing with fixed header */
body {
    padding-top: 64px !important;
}

.mdc-top-app-bar--fixed-adjust {
    padding-top: 64px;
}
