/* Premium Vertical Menu Styles - Erbolario Inspired */
.premium-menu-container {
    position: relative;
    display: inline-block;
}

.premium-menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
   
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 2px;
    min-width: 80px;
}

.premium-menu-toggle-btn:hover {
    border-color: #4a8c4a;
    background-color: #f8faf9 !important;
    transform: translateY(-1px);
}

.toggle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.toggle-icon {
    font-size: 48px;
    color: #2d5a2d;
    line-height: 1;
    font-weight: normal;
}

.toggle-text {
    font-size: 11px;
    color: #2d5a2d;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.premium-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 90, 45, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.premium-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-menu-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 350px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 30px rgba(45, 90, 45, 0.1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8f5e8;
}

.premium-menu-sidebar.active {
    left: 0;
}

.premium-menu-sidebar.right {
    left: auto;
    right: -400px;
    border-right: none;
    border-left: 1px solid #e8f5e8;
}

.premium-menu-sidebar.right.active {
    right: 0;
}

.premium-menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #2d5a2d 0%, #4a8c4a 100%);
    border-bottom: 3px solid #3a7a3a;
    min-height: 30px;
}

.premium-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.premium-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #fcfefc;
}

.premium-accordion-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-menu-item {
    border-bottom: 1px solid #f0f7f0;
}

.premium-menu-item:last-child {
    border-bottom: none;
}

.premium-menu-item-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    transition: all 0.2s ease;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.premium-menu-item-wrapper:hover {
    background-color: #f8faf9;
}

.premium-menu-active > .premium-menu-item-wrapper {
    background-color: #f0f7f0;
    border-left: 4px solid #4a8c4a;
}

.premium-menu-ancestor > .premium-menu-item-wrapper {
    background-color: #f8faf9;
}

.premium-menu-link-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.premium-menu-category-icon {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8f5e8;
}

.menu-item-fallback-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8faf9;
    border-radius: 6px;
    color: #4a8c4a;
    border: 1px solid #e8f5e8;
}

.premium-menu-link {
    text-decoration: none;
    color: #2d5a2d;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    flex: 1;
    font-family: inherit;
    text-align: left;
    padding: 0;
    margin: 0;
}

.premium-menu-link:hover {
    color: #3a7a3a;
}

.premium-accordion-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #333;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.premium-accordion-toggle:hover {
    color: #2d5a2d;
    background: none;
}

.toggle-arrow {
    font-size: 18px;
    color: #333;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.premium-menu-item.active .toggle-arrow {
    transform: rotate(180deg);
    color: #2d5a2d;
}

.premium-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8faf9;
    display: none;
    border-top: 1px solid #f0f7f0;
}

.premium-submenu .premium-menu-item-wrapper {
    padding-left: 25px;
    background: #f8faf9;
    padding-right: 25px;
}

.premium-submenu .premium-menu-active > .premium-menu-item-wrapper {
    background: #f0f7f0;
}

.premium-submenu .premium-submenu .premium-menu-item-wrapper {
    padding-left: 25px;
    background: #f5f9f5;
}

.premium-menu-item.active > .premium-submenu {
    display: block;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .premium-menu-sidebar {
        width: 85%;
        max-width: 320px;
    }
    
    .premium-menu-toggle-btn {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .toggle-icon {
        font-size: 36px;
    }
    
    .toggle-text {
        font-size: 10px;
    }
    
    .premium-menu-item-wrapper {
        padding: 16px 20px;
    }
    
    .premium-menu-header {
        padding: 15px 20px;
    }
    
    /* Nascondi il testo "MENÙ" su mobile, mostra solo l'icona */
    .premium-menu-container.mobile .toggle-text {
        display: none;
    }
    
    .premium-menu-container.mobile .premium-menu-toggle-btn {
        min-width: 50px;
        padding: 8px;
    }
    
    .premium-submenu .premium-menu-item-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .premium-menu-sidebar {
        width: 90%;
        max-width: 280px;
    }
    
    .premium-menu-header {
        padding: 15px;
    }
    
    .premium-menu-item-wrapper {
        padding: 14px 15px;
    }
    
    .premium-menu-link-container {
        gap: 12px;
    }
    
    .premium-menu-category-icon,
    .menu-item-fallback-icon {
        width: 32px;
        height: 32px;
    }
    
    .premium-menu-link {
        font-size: 14px;
    }
    
    .premium-submenu .premium-menu-item-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Scrollbar personalizzata in stile naturale */
.premium-menu-content::-webkit-scrollbar {
    width: 6px;
}

.premium-menu-content::-webkit-scrollbar-track {
    background: #f8faf9;
}

.premium-menu-content::-webkit-scrollbar-thumb {
    background: #d4e8d4;
    border-radius: 3px;
}

.premium-menu-content::-webkit-scrollbar-thumb:hover {
    background: #c4dcc4;
}

/* Animazioni di entrata per gli elementi del menu */
.premium-menu-item {
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
    transform: translateX(-10px);
}

.premium-menu-item:nth-child(1) { animation-delay: 0.05s; }
.premium-menu-item:nth-child(2) { animation-delay: 0.1s; }
.premium-menu-item:nth-child(3) { animation-delay: 0.15s; }
.premium-menu-item:nth-child(4) { animation-delay: 0.2s; }
.premium-menu-item:nth-child(5) { animation-delay: 0.25s; }
.premium-menu-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}