/* ═══════════════════════════════════════════════════════════════
   NAT-SHELF-TABS v2 — تب‌های شیشه‌ای مدرن
   ═══════════════════════════════════════════════════════════════ */

/* ═══ کانتینر تب‌ها ═══ */
.library-shelves-tabs {
    display: flex !important;
    gap: 10px !important;
    padding: 8px 4px 20px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
}
.library-shelves-tabs::-webkit-scrollbar { display: none !important; }

/* ═══ هر تب — شیشه‌ای مدرن ═══ */
.library-shelves-tabs button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 11px 20px !important;
    border-radius: 14px !important;

    /* شیشه‌ای */
    background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.55)) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1.5px solid rgba(255,255,255,.95) !important;
    box-shadow:
        0 4px 14px rgba(15,54,65,.08),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,.03) !important;

    /* متن */
    color: #0F3641 !important;
    font-family: inherit !important;
    font-size: .86rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all .28s cubic-bezier(.4,0,.2,1) !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    text-align: right !important;
    line-height: 1 !important;
}

/* hover — ملایم بدون هاله */
.library-shelves-tabs button:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(42,110,128,.35) !important;
    box-shadow:
        0 6px 16px rgba(15,54,65,.10),
        inset 0 1px 0 rgba(255,255,255,1) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.70)) !important;
    color: #0F3641 !important;
}

/* ═══════════════════════════════════════════════════════════════
   ★★★ تب فعال — شیشه‌ای ملایم، بدون هاله، بدون درخشش ★★★
   ═══════════════════════════════════════════════════════════════ */
.library-shelves-tabs button.is-active {
    /* گرادیانت ملایم از رنگ برند — بدون اشباع زیاد */
    background: linear-gradient(135deg,
        rgba(217,154,43,.15),
        rgba(139,94,20,.08)) !important;
    background-color: rgba(217,154,43,.10) !important;

    /* حاشیه ملایم با رنگ برند */
    border: 1.5px solid rgba(217,154,43,.55) !important;
    border-top-color: rgba(217,154,43,.65) !important;

    /* متن نیوی واضح */
    color: #0F3641 !important;
    font-weight: 900 !important;

    /* سایه بسیار ملایم — بدون هاله */
    box-shadow:
        0 2px 8px rgba(15,54,65,.06),
        inset 0 1px 0 rgba(255,255,255,.60) !important;

    /* بدون جابجایی */
    transform: translateY(0) !important;
    backdrop-filter: blur(16px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(200%) !important;
}

.library-shelves-tabs button.is-active:hover {
    background: linear-gradient(135deg,
        rgba(217,154,43,.20),
        rgba(139,94,20,.10)) !important;
    border-color: rgba(217,154,43,.75) !important;
    box-shadow:
        0 4px 12px rgba(15,54,65,.08),
        inset 0 1px 0 rgba(255,255,255,.70) !important;
    color: #0F3641 !important;
}

/* ═══ متن و شماره در تب‌ها — همیشه دیده شوند ═══ */
.library-shelves-tabs button > *,
.library-shelves-tabs button span,
.library-shelves-tabs button strong,
.library-shelves-tabs button em,
.library-shelves-tabs button .lib-tab-count {
    color: inherit !important;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-shadow: none !important;
}

/* شماره/عدد */
.library-shelves-tabs button .lib-tab-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 100px !important;
    background: rgba(15,54,65,.10) !important;
    color: #0F3641 !important;
    font-size: .68rem !important;
    font-weight: 900 !important;
    margin-right: 2px !important;
}

.library-shelves-tabs button.is-active .lib-tab-count {
    background: rgba(217,154,43,.22) !important;
    color: #5C3D08 !important;
}

/* حذف شبه‌عنصرها */
.library-shelves-tabs button::before,
.library-shelves-tabs button::after {
    content: none !important;
    display: none !important;
}

/* ═══ فوکوس — ملایم ═══ */
.library-shelves-tabs button:focus-visible {
    outline: 2px solid rgba(42,110,128,.40) !important;
    outline-offset: 2px !important;
}

/* ═══ موبایل ═══ */
@media (max-width: 700px) {
    .library-shelves-tabs {
        gap: 6px !important;
        padding: 6px 2px 16px !important;
    }
    .library-shelves-tabs button {
        padding: 9px 14px !important;
        font-size: .78rem !important;
        border-radius: 12px !important;
        gap: 6px !important;
    }
    .library-shelves-tabs button .lib-tab-count {
        min-width: 20px !important;
        height: 18px !important;
        padding: 0 5px !important;
        font-size: .62rem !important;
    }
    .library-shelves-tabs button.is-active {
        box-shadow:
            0 2px 6px rgba(15,54,65,.05),
            inset 0 1px 0 rgba(255,255,255,.55) !important;
    }
}

@media (max-width: 480px) {
    .library-shelves-tabs button {
        padding: 8px 12px !important;
        font-size: .72rem !important;
    }
}