/* ===== Breadcrumb Chevron RTL ===== */
.bc-nav {
    padding: 12px 16px;
    margin-bottom: 8px;
    direction: rtl;
}

.bc-list {
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 0;
}

.bc-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: -12px;
    margin-right: 0;
    z-index: 1;
    padding-bottom: 20px; /* فضا برای دکمه حذف */
}

/* z-index نزولی برای همپوشانی درست */
.bc-item:nth-child(1) { z-index: 20; }
.bc-item:nth-child(2) { z-index: 19; }
.bc-item:nth-child(3) { z-index: 18; }
.bc-item:nth-child(4) { z-index: 17; }
.bc-item:nth-child(5) { z-index: 16; }
.bc-item:nth-child(6) { z-index: 15; }
.bc-item:nth-child(7) { z-index: 14; }
.bc-item:nth-child(8) { z-index: 13; }

/* شکل فلش RTL */
.bc-link,
.bc-label {
    display: inline-block !important;
    padding: 8px 28px 8px 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    position: relative;
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%) !important;
    transition: filter 0.3s ease;
    white-space: nowrap;
}

/* اولین آیتم — لبه راست صاف، نوک فلش سمت چپ */
.bc-item:first-child .bc-link,
.bc-item:first-child .bc-label {
    padding-right: 18px;
    padding-left: 20px;
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%) !important;
    border-radius: 0 6px 6px 0;
}

/* ===== رنگ‌بندی گرادینت ===== */
.bc-item:nth-child(1) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #fff !important;
}

.bc-item:nth-child(2) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #fff !important;
}

.bc-item:nth-child(3) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #fff !important;
}

.bc-item:nth-child(4) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #fff !important;
}

.bc-item:nth-child(5) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #ffffff !important;
}

.bc-item:nth-child(6) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #ffffff !important;
}

.bc-item:nth-child(7) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #ffffff !important;
}

.bc-item:nth-child(n+8) .bc-link {
    background: linear-gradient(135deg, #4c4c4c, #7d7d89) !important;
    color: #fff !important;
}

/* هاور */
.bc-link:hover {
    filter: brightness(1.15);
    z-index: 30;
}

/* آیتم فعلی */
.bc-item--active .bc-label {
    background: linear-gradient(135deg, #000000, #2f2f2f) !important;
    color: #fff !important;
    font-weight: 700;
}

/* جداکننده مخفی */
.bc-sep {
    display: none !important;
}

/* ===== دکمه حذف - وسط پایین ===== */
.bc-delete {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    border: 2px solid #fff;
    cursor: pointer;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bc-delete:hover {
    background: #c0392b;
    transform: translateX(-50%) scale(1.15);
}

/* ===== ریسپانسیو ===== */
@media (max-width: 640px) {
    .bc-link,
    .bc-label {
        font-size: 11px;
        padding: 6px 20px 6px 14px;
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%) !important;
    }

    .bc-item:first-child .bc-link,
    .bc-item:first-child .bc-label {
        padding-right: 12px;
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%) !important;
    }

    .bc-item {
        margin-left: -10px;
        padding-bottom: 18px;
    }
    
    .bc-delete {
        width: 16px;
        height: 16px;
        font-size: 11px;
    }
}

/* آیکن آیتم لیست رو relative کن برای badge */
.afbm-float-list-item {
    position: relative;
}

/* استایل بَج دایره‌ای */
.fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    padding: 0 3px;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.5);
    z-index: 9999;
    font-family: Arial, sans-serif;
    animation: badge-pulse 2s infinite;
    pointer-events: none;
    box-sizing: border-box;
}

/* مخفی شدن وقتی صفر یا خالیه */
.fab-badge:empty,
.fab-badge[data-count="0"] {
    display: none;
}

@keyframes badge-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}
