/* ── تسک ۱۴۰۵/۰۶/۱۶/۰۱، شمارنده-سراسری-۰۰۹، ۰۱۷ و ۰۱۸: the count beside a
      management's name, wherever this panel draws its menu ────────────────── */

/* Only the figure — no «تعداد», no «گالری» — in a red box with white digits
   inside it, standing between the name and the way into a new tab.

   This is the one place it is described, and it is a file of its own because
   the box belongs to no one menu. The header's quick menu drew it first and drew
   it alone; it is every menu's now, so it left that menu's stylesheet rather
   than being copied into the next one. A change to how a counter looks is a
   change to this file and to nothing else (شمارنده-سراسری-۰۰۹).

   The red is the panel's own `danger`, the same one a red badge in a table is
   drawn in, rather than a red chosen here. Sized in `em` off the row's own text
   and given no line box of its own taller than the row already has, so a menu
   with counts is exactly as tall as a menu without them.

   `min-width` and not `width`: «۰» and «۱۲۵۰۰» are the same box until the
   figure is wider than it, and then the box grows with it rather than the
   digits spilling or wrapping (شمارنده-سراسری-۰۱۶ و ۰۱۷). */
.fi-menu-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.4em;
    padding: 0 0.4em;
    margin-inline-start: 0.35rem;
    border-radius: 0.375rem;
    border: 1px solid var(--danger-600, #dc2626);
    background-color: var(--danger-600, #dc2626);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dark .fi-menu-count {
    border-color: var(--danger-600, #dc2626);
}

/* ── The same box in the column itself ──────────────────────────────────────
   Filament draws the very same figure in the sidebar — it is the same
   navigation entry — but in a badge of its own, quiet and grey-blue. Below
   1024px that column *is* the menu: the header's two-column panel is desktop
   only, so on a phone the sidebar is where a counter is read.

   شمارنده-سراسری-۰۰۹ asks that every counter in this panel look the same, so
   the column's badge is given the box the menus draw rather than a second
   appearance being tolerated beside it. The declarations are the same ones
   above and are written here rather than shared through one selector list on
   purpose: Filament paints its badge with utility classes of its own, and the
   colours have to be named again to be taken back — measured in a browser
   rather than assumed, because «رنگ متن» is a managed standard printed after
   every stylesheet in this panel. */
.fi-sidebar .fi-sidebar-item .fi-badge,
.fi-sidebar .fi-sidebar-item .fi-badge * {
    color: #ffffff;
}

.fi-sidebar .fi-sidebar-item .fi-badge {
    min-width: 1.5em;
    height: 1.4em;
    padding: 0 0.4em;
    border-radius: 0.375rem;
    border: 1px solid var(--danger-600, #dc2626);
    background-color: var(--danger-600, #dc2626);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
