/**
 * Shared Header Navigation Styles
 * Used by: header.php, header-booking.php, header-members.php
 */

/* ============================================
   MAIN HEADER LAYOUT
   ============================================ */
.main-header {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 20px;
    background: #000;
}

.main-header .navbar-brand {
    margin-right: auto;
}

.main-header .header-image img {
    height: 25px;
}

/* ============================================
   ============================================ */
.main-header .sh-notif-container {
    margin-right: 15px;
     margin-top: 8px;
    display: inline-flex;
    align-items: center;
}

.user-dropdown a.dropdown-item,
#user-dropdown .dropdown-item,
#user-dropdown a.dropdown-item {
    font-size: 14px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #a1a1a1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px;
  }


.sh-header-auth .user-dropdown .dropdown-item:hover,
.sh-header-auth .user-dropdown a.dropdown-item:hover,
#user-dropdown .dropdown-item:hover,
#user-dropdown a.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* SVG icons in dropdown */
.user-dropdown .dropdown-item svg,
#user-dropdown .dropdown-item svg {
    stroke: currentColor;
}

/* ============================================
   BURGER MENU BUTTON
   ============================================ */
.main-header .toggle-nav,
#hamburger-menu {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 6px 8px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    visibility: visible !important;
    opacity: 1 !important;
}

.main-header .toggle-nav .fa,
#hamburger-menu .fa {
    color: #fff !important;
    opacity: 1 !important;
    font-size: 22px;
}

/* Ensure burger stays visible even when menu is open */
html.sh-menu-open #hamburger-menu {
    display: inline-flex !important;
    visibility: visible !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .main-header {
        padding: 0 8px;
        gap: 8px;
    }
    
    /* Smaller logo on mobile */
    .main-header .header-image img {
        height: 20px;
    }
    
    /* Compact spacing for mobile */
    .main-header .sh-notif-container {
        margin-right: 0;
         margin-top: 0px;
    }
    
    .member-label {
        margin-top: 4px;
        margin-right: 0;
            padding: 5px 0px;
font-size: 12px;
    }
    
    .main-header .toggle-nav,
    #hamburger-menu {
        margin-left: 0;
        padding: 4px 6px;
    }
    
    /* Make burger menu more visible */
    .main-header .toggle-nav .fa,
    #hamburger-menu .fa {
        font-size: 20px;
    }
    
    /* Hide user name on very small screens */
    .member-label .user-name {
        display: none;
    }
    
    /* Compact user menu trigger */
    .user-menu-trigger {
        gap: 4px;
    }
    
    /* Smaller avatar on mobile */
    .sh-modern-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .main-header {
        padding: 0 5px;
        gap: 5px;
    }
    
    .main-header .header-image img {
        height: 17px;
    }
    
    .main-header .toggle-nav .fa,
    #hamburger-menu .fa {
        font-size: 18px;
    }
}

/* ============================================
   ADMIN BAR OFFSET
   ============================================ */
body.admin-bar header {
    margin-top: 32px;
}

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

/* ============================================
   BURGER MENU OVERLAY
   ============================================ */
/* Prevent scrolling when menu is open */
html.sh-menu-open, 
body.sh-menu-open { 
    overflow: hidden !important; 
}

/* Neutralize any legacy off-canvas transforms */
html.sh-menu-open #site-wrapper,
html.sh-menu-open #site-canvas {
    transform: none !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
    transition: none !important;
    -webkit-transition: none !important;
}

/* Overlay container */
.sh-burger-overlay { 
    position: fixed; 
    inset: 0; 
    z-index: 30000; 
    display: none; 
}

.sh-burger-overlay.is-open { 
    display: block; 
}

/* Backdrop with glassmorphism */
.sh-burger-backdrop { 
    position: absolute; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.82); 
    backdrop-filter: blur(16px) saturate(110%); 
    -webkit-backdrop-filter: blur(16px) saturate(110%); 
}

/* Panel container */
.sh-burger-panel { 
    position: relative; 
    z-index: 1; 
    height: 100%; 
    width: 100%; 
    display: flex; 
    align-items: stretch; 
    justify-content: center; 
    padding: 0; 
}

/* Close button */
.sh-burger-close { 
    position: absolute; 
    top: 16px; 
    right: 16px; 
    background: rgba(0,0,0,0.06); 
    color: #ffffff; 
    border: 1px solid rgba(0,0,0,0.18); 
    line-height: 1; 
    width: 44px; 
    height: 44px; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 10px; 
    z-index: 10;
}

.sh-burger-close:hover { 
    background: rgba(0,0,0,0.14); 
    border-color: rgba(0,0,0,0.28); 
}

/* Grid layout */
.sh-burger-grid { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    height: 100vh;
    align-self: center; 
    display: grid; 
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); 
    grid-template-rows: repeat(var(--rows, 3), 1fr); 
    gap: 0; 
    background: transparent; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior: contain; 
}

.sh-burger-grid > li { 
    min-height: 120px;
    background: rgba(0,0,0,0.06); 
    position: relative; 
    min-width: 0; 
    border: 1px solid rgba(255,255,255,0.08); 
}

.sh-burger-grid > li.sh-burger-primary {
    background: linear-gradient(135deg, rgba(0, 200, 212, 0.14), rgba(102, 126, 234, 0.12));
    border-color: rgba(0, 200, 212, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.sh-burger-grid > li.sh-burger-primary:hover {
    background: linear-gradient(135deg, rgba(0, 200, 212, 0.20), rgba(102, 126, 234, 0.16));
}

.sh-burger-grid > li a { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    color: #fff; 
    font-weight: 500; 
    font-size: clamp(14px, 2vw, 18px); 
    letter-spacing: 0.2px; 
    transition: background .15s ease, box-shadow .15s ease; 
    padding: 12px; 
    text-align: center; 
    line-height: 1.25; 
    white-space: normal; 
    word-break: break-word; 
    text-wrap: balance; 
}

.sh-burger-grid > li:hover { 
    background: #0f38555e; 
}

.sh-burger-grid > li:focus-within { 
    outline: 2px solid rgba(0,0,0,0.35); 
    outline-offset: -2px; 
}

/* Burger menu icon styling */
.burger-menu-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Promotional content styling for non-logged users */
.sh-burger-grid {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

.sh-burger-grid a[href*="tel:"],
.sh-burger-grid a[href*="promotion"],
.sh-burger-grid a[href*="member-login"] {
    transition: all 0.3s ease;
}

.sh-burger-grid a[href*="tel:"]:hover {
    background: #45a049 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.sh-burger-grid a[href*="promotion"]:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-2px);
}

.sh-burger-grid a[href*="member-login"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .sh-burger-panel { 
        height: 100vh; 
        padding-top: 150px;
    }
    
    .sh-burger-grid { 
        padding-bottom: calc(15vh + 120px);
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }
}
