/* 
 * @Author: iowen
 * @Author URI: https://www.iowen.cn/
 * @Date: 2024-01-03 00:15:11
 * @LastEditors: iowen
 * @LastEditTime: 2024-01-13 11:05:39
 * @FilePath: \onenavsub\assets\css\sub-style.css
 * @Description: 自定义样式
 */

/* Custom Floating Sub Menu */
.custom-sub-popup {
    position: fixed;
    z-index: 9999;
    background: rgba(245, 245, 245, 0.22) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    display: none;
    width: 140px; /* Reduced width */
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.custom-sub-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.io-black-mode .custom-sub-popup {
    background: rgba(45, 46, 47, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.custom-sub-popup ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-sub-popup li {
    padding: 0 5px;
}

.custom-sub-popup li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: none;
}

.io-black-mode .custom-sub-popup li a {
    color: #cfd3dc;
}

.custom-sub-popup li a:hover {
    background-color: var(--blue-50, #eff6ff); /* Fallback to light blue if var not defined */
    color: var(--theme-color, #f13a3a);
    padding-left: 20px;
}

.io-black-mode .custom-sub-popup li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar Active State with Hover Effect */
/* Apply 'active' styles to our custom active class as well */
.aside-item.active > a,
.aside-item.active-custom > a {
    background: linear-gradient(135deg, var(--theme-color, #f13a3a) 0%, var(--focus-shadow-color, rgba(241, 58, 58, 0.8)) 100%);
    color: #fff !important;
    box-shadow: 0 4px 10px var(--focus-shadow-color, rgba(241, 58, 58, 0.3));
    border-radius: var(--main-radius, 8px);
}

.aside-item.active > a i,
.aside-item.active-custom > a i {
    color: #fff !important;
}

/* Hide original JS popup if it interferes */
.aside-popup {
    display: none !important;
}

