/* ==========================================
   MegaMenu Badge Styling
   برای نمایش Badge در کنار عنوان منو
   ========================================== */

/* Badge اصلی در منو */
.mega-menu-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-right: 6px;
    margin-left: 0;
    font-size: 9px;
    font-weight: bold;
    color: #ffffff !important;
    background-color: #007bff; /* رنگ پیش‌فرض آبی - از دیتابیس override می‌شود */
    border-radius: 3px;
    text-transform: uppercase;
    line-height: 1.1;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* اطمینان از سفید بودن رنگ فونت */
.mega-menu-badge,
.mega-menu-badge * {
    color: #ffffff !important;
}

/* Hover effect برای Badge */
.mega-menu-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Badge در منوهای عمودی */
.mega-menu-dropdown .mega-menu-badge {
    margin-right: 4px;
    margin-left: 0;
    font-size: 8px;
    padding: 1px 4px;
}

/* Badge در submenu items */
.mega-menu-sub-list .mega-menu-badge {
    margin-right: 3px;
    margin-left: 0;
    font-size: 7px;
    padding: 1px 3px;
}

/* Badge در Custom Template 2 */
.custom2-menu-item .mega-menu-badge {
    margin-right: 4px;
    margin-left: 0;
    font-size: 8px;
}

/* Badge در Custom Template 2 submenu */
.custom2-submenu .mega-menu-badge {
    margin-right: 3px;
    margin-left: 0;
    font-size: 7px;
}

/* RTL Support - Badge should be on the right side of text */
[dir="rtl"] .mega-menu-badge {
    margin-right: 6px;
    margin-left: 0;
    float: none;
    display: inline-block;
}

[dir="rtl"] .mega-menu-dropdown .mega-menu-badge {
    margin-right: 4px;
    margin-left: 0;
    float: none;
    display: inline-block;
}

[dir="rtl"] .mega-menu-sub-list .mega-menu-badge {
    margin-right: 3px;
    margin-left: 0;
    float: none;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mega-menu-badge {
        font-size: 8px;
        padding: 1px 4px;
        margin-right: 4px;
    }
    
    .mega-menu-dropdown .mega-menu-badge {
        font-size: 7px;
        padding: 1px 3px;
    }
}

@media (max-width: 480px) {
    .mega-menu-badge {
        font-size: 7px;
        padding: 1px 3px;
        margin-right: 3px;
    }
}

/* Color variations for common badge types */
.mega-menu-badge.badge-new {
    background-color: #28a745 !important; /* سبز */
}

.mega-menu-badge.badge-hot {
    background-color: #dc3545 !important; /* قرمز */
}

.mega-menu-badge.badge-sale {
    background-color: #ffc107 !important; /* زرد */
    color: #000000;
}

.mega-menu-badge.badge-featured {
    background-color: #6f42c1 !important; /* بنفش */
}

.mega-menu-badge.badge-limited {
    background-color: #fd7e14 !important; /* نارنجی */
}

/* Animation for attention-grabbing badges */
@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mega-menu-badge.badge-pulse {
    animation: badge-pulse 2s infinite;
}

/* Badge with border */
.mega-menu-badge.badge-outline {
    background-color: transparent !important;
    border: 1px solid currentColor;
    color: inherit;
}

/* Badge with gradient */
.mega-menu-badge.badge-gradient {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
}

/* Badge with shadow text */
.mega-menu-badge.badge-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
