/**
 * Dokan Sidebar Shortcode Styles
 * Version: 1.0.0
 */

 .dokan-shortcode-sidebar {
    width: 100%;
    max-width: 280px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#dokan-navigation {
    position: relative;
}

/* Mobile menu header */
.mobile-menu-header {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.mobile-menu-title {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile menu toggle */
#mobile-menu-icon {
    display: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    padding: 0;
    background: none;
    border: none;
}

#toggle-mobile-menu {
    display: none;
}

/* Mobile close button */
.mobile-close-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #2C3E30;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    font-size: 20px;
    font-weight: bold;
    line-height: 40px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.mobile-close-btn:hover {
    background: #1a2419;
    transform: scale(1.1);
}

/* Dashboard menu styles */
.dokan-dashboard-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
}

.dokan-dashboard-menu li {
    border-bottom: 1px solid #e1e5e9;
    position: relative;
}

.dokan-dashboard-menu li:last-child {
    border-bottom: none;
}

.dokan-dashboard-menu li a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.dokan-dashboard-menu li a:hover {
    background: #f8f9fa;
    color: #2C3E30;
}

.dokan-dashboard-menu li.active a {
    background: #2C3E30;
    color: #fff;
}

.dokan-dashboard-menu li a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Submenu styles */
.dokan-dashboard-menu .has-submenu > a .menu-dropdown {
    float: right;
    margin-top: 2px;
    transition: transform 0.3s ease;
}

.dokan-dashboard-menu .has-submenu:hover > a .menu-dropdown {
    transform: rotate(90deg);
}

.navigation-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    display: none;
}

.dokan-dashboard-menu .has-submenu:hover .navigation-submenu {
    display: block;
}

.navigation-submenu .submenu-item {
    border-bottom: 1px solid #e1e5e9;
}

.navigation-submenu .submenu-item:last-child {
    border-bottom: none;
}

.navigation-submenu .submenu-link {
    display: block;
    padding: 12px 20px 12px 45px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.navigation-submenu .submenu-link:hover {
    background: #e9ecef;
    color: #2C3E30;
}

.navigation-submenu .submenu-item.active .submenu-link {
    background: #2C3E30;
    color: #fff;
}

.navigation-submenu .submenu-item.active .submenu-link:hover {
    background: #1a2419;
    color: #fff;
}

.navigation-submenu .submenu-link i {
    margin-right: 8px;
    width: 14px;
    text-align: center;
}

/* Common links styles */
.dokan-common-links {
    padding: 15px 20px !important;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
}

.dokan-common-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    color: #666 !important;
    text-decoration: none !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.dokan-common-links a:hover {
    background: #2C3E30 !important;
    color: #fff !important;
}

/* Override clearfix for this specific case */
.dokan-common-links.dokan-clearfix {
    display: flex !important;
}

.dokan-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Tooltip styles */
.tips {
    position: relative;
}

.tips:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dokan-shortcode-sidebar {
        max-width: 100% !important;
        position: relative;
    }
    
    .mobile-menu-header {
        display: flex !important;
    }
    
    #mobile-menu-icon {
        display: block !important;
    }
    
    .dokan-dashboard-menu {
        display: none !important;
    }
    
    #toggle-mobile-menu:checked ~ .dokan-dashboard-menu {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 80vw !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        box-shadow: 2px 0 15px rgba(0,0,0,0.4) !important;
        transform: translateX(0) !important;
        animation: slideInFromLeft 0.3s ease !important;
    }
    
    /* Show close button when menu is open */
    #toggle-mobile-menu:checked ~ .mobile-close-btn {
        display: block !important;
    }
    
    /* Mobile overlay background */
    #toggle-mobile-menu:checked ~ .dokan-dashboard-menu::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 80vw !important;
        width: 20vw !important;
        height: 100vh !important;
        background: rgba(0,0,0,0.6) !important;
        z-index: 9998 !important;
    }
    
    @keyframes slideInFromLeft {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .dokan-dashboard-menu li a {
        padding: 15px 20px !important;
        font-size: 14px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .navigation-submenu .submenu-link {
        padding: 12px 20px 12px 40px !important;
        font-size: 13px !important;
    }
    
    /* Mobile bottom buttons - keep them horizontal */
    .dokan-common-links {
        padding: 15px 20px !important;
        position: sticky !important;
        bottom: 0 !important;
        background: #f8f9fa !important;
        border-top: 2px solid #e1e5e9 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        flex-wrap: nowrap !important;
    }
}

/* Hide shortcode sidebar completely including mobile functionality */
.dokan-shortcode-sidebar.hidden,
.dokan-shortcode-sidebar[style*="display: none"],
.dokan-shortcode-sidebar[style*="visibility: hidden"] {
    display: none !important;
}

.dokan-shortcode-sidebar.hidden #toggle-mobile-menu:checked ~ .dokan-dashboard-menu,
.dokan-shortcode-sidebar[style*="display: none"] #toggle-mobile-menu:checked ~ .dokan-dashboard-menu,
.dokan-shortcode-sidebar[style*="visibility: hidden"] #toggle-mobile-menu:checked ~ .dokan-dashboard-menu {
    display: none !important;
}

.dokan-shortcode-sidebar.hidden #toggle-mobile-menu:checked ~ .mobile-close-btn,
.dokan-shortcode-sidebar[style*="display: none"] #toggle-mobile-menu:checked ~ .mobile-close-btn,
.dokan-shortcode-sidebar[style*="visibility: hidden"] #toggle-mobile-menu:checked ~ .mobile-close-btn {
    display: none !important;
}

/* Additional utility classes */
.dokan-sidebar-left {
    float: left;
    margin-right: 20px;
}

.dokan-sidebar-right {
    float: right;
    margin-left: 20px;
}

.dokan-sidebar-center {
    margin: 0 auto;
}

.dokan-sidebar-full-width {
    max-width: 100%;
    width: 100%;
}

.dokan-sidebar-compact {
    max-width: 200px;
}

.dokan-sidebar-expanded {
    max-width: 350px;
}

/* Ensure original Dokan sidebar hiding doesn't affect shortcode */
.dokan-shortcode-sidebar {
    display: block !important;
    visibility: visible !important;
}
