/**
 * Header Styles
 * PharmEasy header and navigation styles
 */

body.no-scroll {
    overflow: hidden;
}

/* Header Styles */
.site-header {
    background: #FFFFFF;
    color: #10847E;
    border-bottom: 1px solid rgba(16, 132, 126, 0.15);
    padding: 0;
    position: fixed;
    top: 0;
    z-index: 999;
    width: 100%;
    transition: top 0.2s ease;
}

body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}


.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 928px;
    margin: 0 auto;
    padding: 10px 0;
    position: relative;
}

/* Hamburger Menu Styles - Hidden on Desktop */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #10847E;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Logo Styles */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: #10847E;
}

.logo-image {
    display: block;
    height: 40px;
    width: auto;
}

.logo-image-mobile {
    display: none;
}

/* Navigation Styles */
.header-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.header-nav-overlay {
    display: none;
}

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

.nav-menu-mobile {
    display: none;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: rgb(79, 88, 94);
    font-weight: 600;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: opacity 0.2s ease;
    display: block;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .header-container {
        padding: 20px 0px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}

/* Mobile Styles - Hamburger Menu */
@media (max-width: 767px) {
    .site-header {
        border-bottom: none;
        position: fixed;
        top: 0;
        z-index: 999;
    }
    
    .header-container {
        padding: 24px 20px;
        position: relative;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 20px;
    }
    
    /* Center logo on mobile */
    .header-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo-image {
        height: 32px;
    }
    
    .logo-image-desktop {
        display: none;
    }
    
    .logo-image-mobile {
        display: block;
    }
    
    /* Hide navigation by default on mobile */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 320px;
        max-width: 85%;
        background: #FFFFFF;
        padding: 75px 0px 0px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1100;
        box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* Show navigation when active */
    .header-nav.active {
        transform: translateX(0);
        z-index: 1100;
    }
    
    .header-nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1050;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .header-nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Hide desktop menu on mobile */
    .nav-menu-desktop {
        display: none;
    }
    
    /* Show mobile menu */
    .nav-menu-mobile {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
        height: 100%;
        padding: 0;
    }
    
    .nav-item-mobile {
        border-bottom: 1px solid rgba(16, 132, 126, 0.1);
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .nav-item-mobile:last-child {
        border-bottom: none;
    }
    
    .nav-link-mobile {
        display: flex;
        align-items: center;
        padding: 16px;
        font-size: 16px;
        width: 100%;
        text-align: left;
        text-decoration: none;
        color: rgb(79, 88, 94);
        font-weight: 500;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        transition: background-color 0.2s ease;
        position: relative;
        gap: 12px;
    }
    
    .nav-link-mobile:hover {
        background-color: rgba(16, 132, 126, 0.08);
    }
    
    .nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        color: rgb(79, 88, 94);
    }
    
    .nav-icon svg {
        width: 100%;
        height: 100%;
    }
    
    .nav-label {
        flex: 1;
        text-align: left;
    }
    
    .nav-badge {
        background-color: #FFD700;
        color: #000000;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 3px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-left: auto;
    }
    
    .nav-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        color: rgb(79, 88, 94);
        margin-left: auto;
        transition: transform 0.3s ease;
    }
    
    .nav-item-mobile.has-submenu.expanded .nav-arrow {
        transform: rotate(180deg);
    }
    
    .nav-submenu {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
        background-color: rgba(16, 132, 126, 0.03);
    }
    
    .nav-item-mobile.expanded .nav-submenu {
        display: block;
    }
    
    .nav-submenu li {
        border-bottom: 1px solid rgba(16, 132, 126, 0.05);
    }
    
    .nav-submenu li:last-child {
        border-bottom: none;
    }
    
    .nav-submenu a {
        display: block;
        padding: 12px 16px 12px 52px;
        color: rgb(79, 88, 94);
        text-decoration: none;
        font-size: 15px;
        transition: background-color 0.2s ease;
    }
    
    .nav-submenu a:hover {
        background-color: rgba(16, 132, 126, 0.08);
    }
    
    /* Desktop nav link styles remain for desktop */
    .nav-link {
        padding: 16px;
        font-size: 16px;
        width: 100%;
        text-align: left;
    }
    
    .nav-link:hover {
        background-color: rgba(16, 132, 126, 0.08);
        opacity: 1;
    }
}