/* Vebses Sidebar Menu - Frontend Styles */

/* Wrapper */
.vebses-sidebar-wrapper {
    width: 340px;
    height: 420px;
    position: relative;
}

/* Backdrop overlay */
.vebses-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    pointer-events: none;
}

/* Floating Menu */
.vebses-sidebar-floating {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    height: auto;
    max-height: 420px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s;
    z-index: 100;
}

/* Hover States */
.vebses-sidebar-wrapper:hover .vebses-sidebar-floating {
    max-height: 900px;
    overflow: visible;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.vebses-sidebar-wrapper:hover .vebses-menu-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Menu List */
.vebses-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 10px 0 60px 0 !important;
}

.vebses-menu-item {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Menu Link */
.vebses-menu-link {
    display: flex !important;
    align-items: center !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
    color: #334155 !important;
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    gap: 14px !important;
    border-left: 3px solid transparent !important;
    background: none !important;
    margin: 0 !important;
}

.vebses-menu-item:hover .vebses-menu-link {
    background-color: #f1f5f9 !important;
    color: #2563eb !important;
    border-left-color: #2563eb !important;
}

/* Menu Icon */
.vebses-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: filter 0.2s ease;
    /* Default gray color using filter */
    filter: brightness(0) saturate(100%) invert(70%) sepia(10%) saturate(300%) hue-rotate(180deg);
}

.vebses-menu-icon.vebses-menu-icon-img {
    object-fit: contain;
}

/* Blue color on hover - works for both SVG and images */
.vebses-menu-item:hover .vebses-menu-icon {
    filter: brightness(0) saturate(100%) invert(35%) sepia(93%) saturate(1352%) hue-rotate(213deg) brightness(97%) contrast(87%);
}

/* Arrow */
.vebses-arrow-right {
    margin-left: auto;
    width: 14px;
    height: 14px;
    opacity: 0.3;
    stroke-width: 2;
    flex-shrink: 0;
}

/* More Indicator */
.vebses-more-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 90%);
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 15px;
    transition: opacity 0.3s;
}

.vebses-sidebar-wrapper:hover .vebses-more-indicator {
    opacity: 0;
}

.vebses-more-arrow {
    width: 20px;
    height: 20px;
    stroke: #cbd5e1;
    stroke-width: 2;
    fill: none;
    animation: vebses-bounce 2s infinite;
}

@keyframes vebses-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Submenu */
.vebses-submenu {
    position: absolute;
    left: 100%;
    top: -5px;
    width: 240px;
    background: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 15px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px);
    transition: all 0.2s ease;
    z-index: 110;
}

/* Bridge to prevent menu from closing when moving to submenu */
.vebses-menu-item.has-children::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    transform: translateX(100%);
}

.vebses-menu-item:hover .vebses-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(10px);
}

.vebses-submenu h4,
.vebses-submenu h4.vebses-submenu-title {
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.4 !important;
    border: none !important;
    background: none !important;
}

.vebses-submenu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.vebses-submenu ul li {
    margin: 0 !important;
    padding: 0 !important;
}

.vebses-submenu li a,
.vebses-submenu ul li a {
    display: block !important;
    padding: 8px 10px !important;
    text-decoration: none !important;
    color: #475569 !important;
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: background 0.2s, color 0.2s !important;
    border: none !important;
    background: none !important;
    margin: 0 !important;
}

.vebses-submenu li a:hover,
.vebses-submenu ul li a:hover {
    background: #f8fafc !important;
    color: #2563eb !important;
}

/* ===========================================
   CATEGORY SIDEBAR [sidebar_by_vebses]
   =========================================== */

.vebses-cat-sidebar {
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
    padding: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Back Link */
.vebses-back-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
    margin-bottom: 5px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.vebses-back-icon {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    flex-shrink: 0 !important;
}

.vebses-back-link:hover {
    color: #1e293b !important;
}

.vebses-back-link:hover .vebses-back-icon {
    transform: translateX(-4px) !important;
}

/* Parent Header */
.vebses-parent-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.vebses-parent-icon-box {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    background: #eff6ff !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2563eb !important;
}

.vebses-parent-icon {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    /* Blue color filter for images */
    filter: brightness(0) saturate(100%) invert(35%) sepia(93%) saturate(1352%) hue-rotate(213deg) brightness(97%) contrast(87%) !important;
}

.vebses-parent-icon-img {
    object-fit: contain !important;
}

.vebses-parent-info h2 {
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    line-height: 1.3 !important;
}

.vebses-parent-info span {
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

/* Subcategory List */
.vebses-sub-list {
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Subcategory Items */
.vebses-sub-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    text-decoration: none !important;
    color: #475569 !important;
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative !important;
    background: none !important;
    border: none !important;
    margin: 0 !important;
}

.vebses-sub-item:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
    transform: translateX(4px) !important;
}

/* Active State */
.vebses-sub-item.active {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    transform: translateX(0) !important;
}

/* Blue Vertical Pill Indicator */
.vebses-sub-item.active::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 24px !important;
    width: 3px !important;
    background-color: #2563eb !important;
    border-top-right-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
}

/* Count Badge */
.vebses-count {
    font-family: 'FiraGO', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    color: #cbd5e1 !important;
    font-weight: 400 !important;
}

.vebses-sub-item:hover .vebses-count {
    color: #94a3b8 !important;
}

.vebses-sub-item.active .vebses-count {
    color: #93c5fd !important;
}
