/**
 * Menu Icons Styles for Novoshop Theme
 * Supports Font Awesome icons and custom images in menus
 */

/* Main Desktop Menu Icons */
.novoshop-menu .menu-icon {
    margin-left: 6px;
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
}

.novoshop-menu .menu-icon-image {
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Menu Labels (badges like "جدید", "فروش ویژه") */
.novoshop-menu .menu-label {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    background: #ff6600;
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}

/* Mobile Menu Icons */
.novoshop-mobile-menu .menu-icon {
    margin-left: 8px;
    font-size: 18px;
    display: inline-block;
    vertical-align: middle;
    color: inherit;
}

.novoshop-mobile-menu .cu-menu-icon,
.novoshop-mobile-menu .menu-icon-image {
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Mobile Menu Labels */
.novoshop-mobile-menu .dmenu_label,
.novoshop-mobile-menu .menu-label {
    display: inline-block;
    margin-right: 8px;
    padding: 3px 10px;
    background: #ff6600;
    color: #fff;
    font-size: 10px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}

/* Icon alignment fixes */
.novoshop-menu a {
    display: flex;
    align-items: center;
}

.novoshop-mobile-menu a {
    display: flex;
    align-items: center;
}

/* Submenu icon indicators */
.menu-item-has-children > a::after,
.has-submenu > a::after,
.has-sub > a::after {
    content: "\f107"; /* Font Awesome chevron-down */
    font-family: "Font Awesome 5 Free", "FontAwesome", "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
    font-size: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Rotate submenu indicator on hover/active */
.menu-item-has-children:hover > a::after,
.has-submenu:hover > a::after,
.has-sub:hover > a::after,
.menu-item-has-children.active > a::after,
.has-submenu.active > a::after,
.has-sub.active > a::after {
    transform: rotate(180deg);
}

/* Icon hover effects */
.novoshop-menu a:hover .menu-icon,
.novoshop-mobile-menu a:hover .menu-icon {
    opacity: 0.8;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Label color variations */
.menu-label.new {
    background: #28a745;
}

.menu-label.sale {
    background: #dc3545;
}

.menu-label.hot {
    background: #ffc107;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .novoshop-menu .menu-icon {
        font-size: 14px;
        margin-left: 4px;
    }
    
    .novoshop-menu .menu-icon-image {
        width: 16px;
        height: 16px;
        margin-left: 4px;
    }
    
    .novoshop-menu .menu-label {
        font-size: 10px;
        padding: 2px 6px;
        margin-right: 6px;
    }
}

/* Submenu icons */
.sub-menu .menu-icon {
    margin-left: 8px;
    font-size: 16px;
}

.sub-menu .menu-icon-image {
    margin-left: 8px;
    width: 18px;
    height: 18px;
}

/* Icon color inheritance */
.novoshop-menu a,
.novoshop-mobile-menu a {
    color: inherit;
}

.novoshop-menu .menu-icon,
.novoshop-mobile-menu .menu-icon {
    color: inherit;
}

/* Ensure Font Awesome icons display correctly */
.menu-icon.fa-solid,
.menu-icon.fa-brands,
.menu-icon.fal,
.menu-icon.fab,
.menu-icon.fas,
.menu-icon.far {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome", "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Brand icons */
.menu-icon.fa-brands {
    font-family: "Font Awesome 5 Brands", "FontAwesome", "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* Solid icons (default) */
.menu-icon.fa-solid {
    font-family: "Font Awesome 5 Free", "FontAwesome", "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* Regular icons */
.menu-icon.fa-regular,
.menu-icon.far {
    font-family: "Font Awesome 5 Free", "FontAwesome", "Font Awesome 6 Free" !important;
    font-weight: 400;
}

/* Light icons (Pro only, fallback to regular) */
.menu-icon.fal {
    font-family: "Font Awesome 5 Free", "FontAwesome", "Font Awesome 6 Free" !important;
    font-weight: 300;
}

/* Iranian icons support */
.menu-icon.dico {
    font-family: "ir-icons" !important;
}

/* Icon spacing in RTL */
html[dir="rtl"] .menu-icon,
html[dir="rtl"] .menu-icon-image {
    margin-right: 8px;
    margin-left: 0;
}

html[dir="rtl"] .menu-label {
    margin-left: 8px;
    margin-right: 0;
}

/* Accessibility improvements */
.menu-icon[aria-hidden="true"] {
    pointer-events: none;
}

/* Print styles */
@media print {
    .menu-icon,
    .menu-label {
        display: none;
    }
}

