/* Mobile Sidebar 1 Styles */

/* Force all social SVGs to white outline for consistency on dark background */
.ms1-sidebar-social-links svg {
    color: #ffffff !important;         /* sets currentColor */
    stroke: currentColor !important;   /* draw with stroke */
    stroke-width: 1.5 !important;      /* consistent weight */
    fill: none !important;             /* prevent solid fill (so TikTok/YouTube match others) */
    shape-rendering: geometricPrecision;
}

.ms1-collapse-sidebar {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    position: relative;            /* live inside the wrapper (.mobile-sidebar) */
    top: 0;
    left: 0;                        /* don't offset inside wrapper */
    width: 100%;                    /* take the wrapper width (320px) */
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.ms1-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ms1-sidebar-overlay.ms1-show {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Header */
.ms1-sidebar-header {
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ms1-close-sidebar-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.ms1-close-sidebar-btn:hover {
    transform: rotate(90deg);
}

/* User Profile Section */
.ms1-sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
}

.ms1-sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.ms1-sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms1-sidebar-user-info {
    flex: 1;
}

.ms1-sidebar-user-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.ms1-sidebar-auth-links {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.ms1-sidebar-auth-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ms1-sidebar-auth-link:hover {
    color: #fff;
}

/* Menu Styles */
.ms1-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ms1-sidebar-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ms1-sidebar-menu-link {
    display: block;
    padding: 8px 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    margin: 2px 10px;
}

.ms1-sidebar-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
    margin-left: 15px;
}

/* Has Arrow Indicator */
.ms1-sidebar-has-arrow {
    padding-right: 40px; /* reserve space for chevron */
}

.ms1-sidebar-has-arrow::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.3s ease;
    opacity: 0.9;
    pointer-events: none;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-has-arrow::after {
    transform: translateY(-50%) rotate(45deg);
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu {
    max-height: 3000px;
    transform: translateX(0);
    opacity: 1;
}

/* Submenu Styles */
.ms1-sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
    transform: translateX(-20px);
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(.165, .84, .44, 1), transform 0.5s cubic-bezier(.165, .84, .44, 1), opacity 0.5s cubic-bezier(.165, .84, .44, 1);
}

.ms1-sidebar-submenu .ms1-sidebar-menu-item {
    border-bottom: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(1) {
    transition-delay: 0.1s;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(2) {
    transition-delay: 0.15s;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(3) {
    transition-delay: 0.2s;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(4) {
    transition-delay: 0.25s;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(5) {
    transition-delay: 0.3s;
}

.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-sidebar-menu-item:nth-child(n+6) {
    transition-delay: 0.35s;
}

.ms1-sidebar-submenu .ms1-sidebar-menu-link {
    padding: 12px 20px 12px 35px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.ms1-sidebar-submenu .ms1-sidebar-submenu .ms1-sidebar-menu-link {
    padding-left: 50px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

/* Social Media Links */
.ms1-sidebar-social-links {
    /* turn into equal-width grid cells with a thin border and dividers */
    display: grid;
    grid-auto-flow: column;           /* keep icons in one row */
    grid-auto-columns: 1fr;           /* equal width cells */
    gap: 0;                           /* divider lines handle spacing */
    padding: 0;                       /* tighter look */
    margin: 12px 16px 16px;           /* reduce overall width inside sidebar */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;                 /* clip rounded corners */
    background: rgba(0,0,0,0.2);
}

.ms1-sidebar-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;                      /* fill cell */
    height: 44px;                     /* slightly reduced height */
    color: #fff;
    font-size: 20px;                  /* slightly smaller icon size */
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2); /* grid divider */
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 0;                 /* square cells */
    background: transparent;
}

.ms1-sidebar-social-link:last-child {
    border-right: none;               /* no divider on last cell */
}

/* keep svg size consistent and white */
.ms1-sidebar-social-link svg {
    width: 20px;
    height: 20px;
}

.ms1-sidebar-social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Force social icons to white for visibility */
.ms1-sidebar-social-link i {
    color: #ffffff !important;
}

/* Appear Animation */
.ms1-appear-delay-1 {
    opacity: 0;
    transform: translateX(-20px);
    transition: transform 0.85s cubic-bezier(.165, .84, .44, 1) 0.1s, opacity 0.85s cubic-bezier(.165, .84, .44, 1) 0.15s;
}

.ms1-appear-delay-2 {
    opacity: 0;
    transform: translateX(-20px);
    transition: transform 0.85s cubic-bezier(.165, .84, .44, 1) 0.195s, opacity 0.85s cubic-bezier(.165, .84, .44, 1) 0.27s;
}

/* when sidebar is open, reveal content */
.ms1-collapse-sidebar.ms1-open .ms1-appear-delay-1,
.ms1-collapse-sidebar.ms1-open .ms1-appear-delay-2,
/* backward-compat: if parent wrapper toggles .mobile-sidebar.open */
.mobile-sidebar.open .ms1-appear-delay-1,
.mobile-sidebar.open .ms1-appear-delay-2 {
    opacity: 1;
    transform: translateX(0);
}

/* Also animate child items when their parent submenu opens */
.ms1-sidebar-menu-item.ms1-active > .ms1-sidebar-submenu .ms1-appear-delay-2 {
    opacity: 1;
    transform: translateX(0);
}

/* Scrollbar Styling */
.ms1-c-scrollbar-light::-webkit-scrollbar {
    width: 6px;
}

.ms1-c-scrollbar-light::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.ms1-c-scrollbar-light::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.ms1-c-scrollbar-light::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Account Section at Bottom */
.ms1-sidebar-account-section {
    padding: 0;
    margin-top: auto;
}

.ms1-sidebar-account-section .ms1-sidebar-menu-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 480px) {
    .ms1-collapse-sidebar {
        width: 100%;
        max-width: 320px;
    }
}