/*
 * تسک ۱۴۰۵/۰۸/۱۱/۰۵، بند ۳ و ۴ — «دسترسی سریع».
 *
 * 1. The menu's own header row is always photoaman's approved red #B84249
 *    (photoaman-panel-palette.css, `--pa-red`; photoaman-menu-palette.css,
 *    `--pa-menu-red`) with white writing, icon and arrow — wherever the panel
 *    draws that row: the phone sidebar, the closed column on the desktop, the
 *    ☰ menu's first column and the role preview's card (that one is in
 *    roles/access-preview.blade.php, beside the rest of the window). Not on
 *    hover, not when open, not because a page inside it is open: always. The
 *    pointer and an open window only darken it one solid step, with no
 *    transition, so it never blinks. White on #B84249 is 5.4 : 1 and on the
 *    darker #9A353C 7.4 : 1 (WCAG AA asks 4.5 : 1).
 *
 *    The class (`QuickList::HEADER_CLASS`) is on the header row alone — in
 *    the phone sidebar on the group's <li>, and every rule below reaches only
 *    its `.fi-sidebar-group-btn` — so nothing under the row inherits a colour
 *    from it.
 *
 * 2. Each entry under it is a copy of a management that lives in another menu,
 *    and it wears that menu's colour, where «اعمال رنگ به» asked for it
 *    («آیکون و عنوان»، «فقط آیکون»، «فقط عنوان»): `data-quick-access-tint`
 *    says where, `--qa-tint` is the colour (QuickList::copyOf). An entry whose
 *    menu has no colour carries neither and stays exactly as it was. The entry
 *    being stood in keeps its white-on-red «you are here», so the rules skip
 *    it.
 *
 * Loaded after photoaman-menu-palette.css, and every rule starts at
 * `.fi-body.fi-panel-admin`, so it outweighs the menus' own hover, open,
 * zebra and «current» rules without `!important`.
 */

.fi-body.fi-panel-admin {
    --qa-brand: #b84249;
    --qa-brand-dark: #9a353c;
    --qa-brand-edge: #7f2c32;
    --qa-on-brand: #ffffff;
}

/* ————— 1. The header row ————— */

.fi-body.fi-panel-admin .fi-quick-menu-group.fi-quick-access-group,
.fi-body.fi-panel-admin .fi-sidebar-flyout-group.fi-quick-access-group,
.fi-body.fi-panel-admin .fi-sidebar-group.fi-quick-access-group > .fi-sidebar-group-btn {
    background-color: var(--qa-brand);
    color: var(--qa-on-brand);
    font-weight: 700;
    box-shadow: inset -3px 0 0 var(--qa-brand-edge);
    transition: none;
    animation: none;
}

.fi-body.fi-panel-admin .fi-sidebar-group.fi-quick-access-group > .fi-sidebar-group-btn {
    border-radius: 0.5rem;
    padding-inline: 0.5rem;
}

.fi-body.fi-panel-admin .fi-quick-menu-group.fi-quick-access-group:is(:hover, .fi-quick-menu-open, .fi-quick-menu-parent),
.fi-body.fi-panel-admin .fi-sidebar-flyout-group.fi-quick-access-group:is(:hover, .fi-sidebar-flyout-open, .fi-sidebar-flyout-parent),
.fi-body.fi-panel-admin .fi-sidebar-group.fi-quick-access-group > .fi-sidebar-group-btn:hover,
.dark .fi-body.fi-panel-admin .fi-quick-menu-group.fi-quick-access-group:is(:hover, .fi-quick-menu-open),
.dark .fi-body.fi-panel-admin .fi-sidebar-flyout-group.fi-quick-access-group:is(:hover, .fi-sidebar-flyout-open) {
    background-color: var(--qa-brand-dark);
    color: var(--qa-on-brand);
    box-shadow: inset -5px 0 0 var(--qa-brand-edge);
}

/* Name, icon and arrow white, at full strength (the arrows are otherwise
   drawn half-faded). */
.fi-body.fi-panel-admin .fi-quick-access-group:is(.fi-quick-menu-group, .fi-sidebar-flyout-group)
    :is(.fi-quick-menu-row-icon, .fi-quick-menu-label, .fi-quick-menu-chevron, .fi-sidebar-flyout-row-icon, .fi-sidebar-flyout-label, .fi-sidebar-flyout-chevron, svg),
.fi-body.fi-panel-admin .fi-sidebar-group.fi-quick-access-group > .fi-sidebar-group-btn
    :is(.fi-sidebar-group-label, .fi-icon, .fi-icon-btn, .fi-sidebar-group-collapse-btn, svg) {
    color: var(--qa-on-brand);
    opacity: 1;
}

/* The phone sidebar's collapse button is a grey icon button of its own. */
.fi-body.fi-panel-admin .fi-sidebar-group.fi-quick-access-group > .fi-sidebar-group-btn .fi-sidebar-group-collapse-btn:hover {
    background-color: transparent;
    color: var(--qa-on-brand);
}

/* ————— 2. The entries under it: their own menu's colour ————— */

/* The ☰ menu's second column and the closed column's window. */
.fi-body.fi-panel-admin :is(.fi-quick-menu-item, .fi-sidebar-flyout-item)[data-quick-access-tint="both"]:not(.fi-quick-menu-current, .fi-sidebar-flyout-current)
    :is(.fi-quick-menu-row-icon, .fi-quick-menu-label, .fi-sidebar-flyout-item-icon, .fi-sidebar-flyout-item-label),
.fi-body.fi-panel-admin :is(.fi-quick-menu-item, .fi-sidebar-flyout-item)[data-quick-access-tint="icon"]:not(.fi-quick-menu-current, .fi-sidebar-flyout-current)
    :is(.fi-quick-menu-row-icon, .fi-sidebar-flyout-item-icon),
.fi-body.fi-panel-admin :is(.fi-quick-menu-item, .fi-sidebar-flyout-item)[data-quick-access-tint="label"]:not(.fi-quick-menu-current, .fi-sidebar-flyout-current)
    :is(.fi-quick-menu-label, .fi-sidebar-flyout-item-label) {
    color: var(--qa-tint);
}

/* The phone sidebar: the copy's own <li> carries the colour. */
.fi-body.fi-panel-admin .fi-sidebar-item[data-quick-access-tint="both"]:not(.fi-active) > .fi-sidebar-item-btn > :is(.fi-sidebar-item-icon, .fi-icon, .fi-sidebar-item-label),
.fi-body.fi-panel-admin .fi-sidebar-item[data-quick-access-tint="icon"]:not(.fi-active) > .fi-sidebar-item-btn > :is(.fi-sidebar-item-icon, .fi-icon),
.fi-body.fi-panel-admin .fi-sidebar-item[data-quick-access-tint="label"]:not(.fi-active) > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--qa-tint);
}
