/**
 * Custom Sidebar Menu Styles
 * This file should be placed in your child theme's css directory
 */

/* General sidebar container */
.custom-sidebar-container:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: relative;
    z-index: 999;
}

/* Body adjustments when sidebar is open */
html.sidebar-open:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    overflow: hidden;
}

body.sidebar-open:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    overflow: hidden;
}

/* Prevent content shift when scrollbar disappears */
.custom-sidebar-container:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: relative;
    z-index: 999;
    --scrollbar-width: 0px;
}

.hamburger:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    width: 50px;
    height: 50px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  .hamburger:hover:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
  }
  
  .hamburger .bar:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background-color: #1c669e;
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  }
  
  .hamburger .bar:nth-child(1):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: translateY(-8px);
  }
  
  .hamburger:hover .bar:nth-child(1):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: translateY(-9px);
}

  .hamburger .bar:nth-child(3):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: translateY(8px);
  }
  
  .hamburger:hover .bar:nth-child(3):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: translateY(9px);
}

  /* X transformation */
  .hamburger.active:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background-color: #1c669e;
    transform: translateX(30px);
  }

  @media (max-width: 1024px) {
    .hamburger.active:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
        transform: translateX(10px);
    }
  }
  
  .hamburger.active .bar:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background-color: #ffffff;
  }
  
  .hamburger.active .bar:nth-child(1):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    opacity: 0;
    transform: translateX(-20px);
  }
  
  .hamburger.active .bar:nth-child(3):not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    transform: rotate(-45deg);
  }

/* Sidebar */
.sidebar:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: #f4f4f4;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    right: 0;
}

.sidebar-content:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    padding: 20px 0 20px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Menu items */
.menu-items-container:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: relative;
    flex: 1;
    margin: 60px 0 0 0 !important;
    overflow: hidden; /* Ensure nothing spills out */
}

.menu-items:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    list-style: none !important;
    padding: 0 0 10px 0 !important;
    margin: 0 !important;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f4f4f4;
    scroll-behavior: smooth;
}

/* Custom scrollbar styling for Webkit browsers */
.menu-items:not(:where([data-ob-chrome],[data-ob-chrome] *))::-webkit-scrollbar {
    width: 6px;
}

.menu-items:not(:where([data-ob-chrome],[data-ob-chrome] *))::-webkit-scrollbar-track {
    background: #f4f4f4;
}

.menu-items:not(:where([data-ob-chrome],[data-ob-chrome] *))::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
    border: 2px solid #f4f4f4;
}

.menu-items:not(:where([data-ob-chrome],[data-ob-chrome] *))::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

/* Scroll controls */
.menu-scroll-controls:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: absolute;
    right: 10px;
    width: 24px;
    display: none; /* Hidden by default, shown via JS when needed */
}

.menu-scroll-up:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    top: 0;
    position: absolute;
    background: linear-gradient(to bottom, rgba(244, 244, 244, 0.95) 50%, rgba(244, 244, 244, 0.5));
    height: 30px;
    width: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-scroll-down:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    bottom: 0;
    position: absolute;
    background: linear-gradient(to top, rgba(244, 244, 244, 0.95) 50%, rgba(244, 244, 244, 0.5));
    height: 30px;
    width: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-scroll-controls.show .menu-scroll-up:not(:where([data-ob-chrome],[data-ob-chrome] *)),
.menu-scroll-controls.show .menu-scroll-down:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    opacity: 1;
}

.menu-scroll-up i:not(:where([data-ob-chrome],[data-ob-chrome] *)),
.menu-scroll-down i:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    color: #555;
    font-size: 14px;
}

.menu-items li:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    border-bottom: 1px solid #ddd;
    opacity: 0;
    transform: translateX(30px);
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar.active .menu-items li:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.menu-items a:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    font-size: 1.1em !important;
    text-decoration: none !important;
    color: #333 !important;
    display: block !important;
    width: 100% !important;
    padding: 15px 20px 15px 40px !important;
    box-sizing: border-box !important;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out !important;
    transform-origin: left center;
}

.menu-items a:hover:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background: linear-gradient(to right, #fff, #f4f4f4) !important;
    transform: scale(1.03);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

ul.sidebar-submenu a:hover:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background: linear-gradient(to left, #fff, #f4f4f4) !important;
}

/* Notifications */
.notifications-container:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    margin: 30px 0;
    padding: 0 20px;
    position: relative;
}

.notification-box:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    min-height: 120px;
}

.notification-title:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 1em;
}

.notification-text:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.nav-arrows:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: relative;
    bottom: 0;
    transform: translateY(50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.nav-arrow:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    pointer-events: all;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.nav-arrow:hover:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background: white;
    transform: scale(1.1);
}

.notification-indicators:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.indicator:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    width: 8px;
    height: 8px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    background: #888;
    transform: scale(1.2);
}

/* Social icons */
.social-icons:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    padding: 20px 0;
    border-top: 1px solid #ddd;
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-shrink: 0;
}

.social-icons a:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    color: #333 !important;
    font-size: 1.5em !important;
    transition: color 0.3s !important;
    text-decoration: none !important;
}

.social-icons a:hover.fa-instagram:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #E1306C !important; }
.social-icons a:hover.fa-facebook:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #1877F2 !important; }
.social-icons a:hover.fa-twitter:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #1DA1F2 !important; }
.social-icons a:hover.fa-tiktok:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #000000 !important; }
.social-icons a:hover.fa-youtube:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #FF0000 !important; }
.social-icons a:hover.fa-linkedin:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #0077B5 !important; }
.social-icons a:hover.fa-pinterest:not(:where([data-ob-chrome],[data-ob-chrome] *)) { color: #E60023 !important; }

/* Overlay */
.sidebar-overlay:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 998;
}

.sidebar-overlay.active:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    70% {
        opacity: 1;
        transform: translateX(-5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .sidebar:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
        width: 280px;
        right: -280px;
    }
    
    .menu-items a:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
        padding: 12px 15px 12px 25px !important;
    }
    
    .notification-box:not(:where([data-ob-chrome],[data-ob-chrome] *)) {
        min-height: 100px;
        padding: 15px;
    }
}