/*
 * The permission matrix (backoffice account form).
 *
 * ⚠ Plain CSS served through `filament:assets`, NOT a Tailwind theme build.
 * The panel has no custom theme and referencing the Vite manifest from the
 * provider crashed the application wherever the front end was not built
 * (build #765). A few rules one screen needs must not be able to stop the
 * application from starting.
 *
 * What it does, both requested from the screen (Sets, 27.07.2026):
 *
 *   1. Centres each tick under its column heading. Left aligned, a wide column
 *      puts the box far from the word naming it, and the eye stops being able
 *      to tell which verb it is agreeing to.
 *
 *   2. Colours the state. Green means held, red means not — the point being
 *      that "not held" should look like a decision rather than like a control
 *      nobody has reached yet. A cell that is empty because the action does not
 *      exist stays a plain dash and is deliberately left uncoloured: it is not
 *      a state, it is an absence.
 */

.fi-permission-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fi-permission-cell .fi-fo-field-wrp-label,
.fi-permission-heading {
    text-align: center;
}

.fi-permission-heading {
    display: block;
    width: 100%;
}

/* Not held. Filament's own border colour reads as "untouched"; this reads as
   "no", which is what it means. */
.fi-permission-cell input.fi-checkbox-input:not(:checked) {
    border-color: rgb(220 38 38);
    background-color: rgb(254 242 242);
}

:where(.dark) .fi-permission-cell input.fi-checkbox-input:not(:checked) {
    border-color: rgb(248 113 113);
    background-color: rgb(69 10 10);
}

/* Held. Overrides the panel's primary colour on purpose: on this screen the
   colour is carrying meaning, not branding. */
.fi-permission-cell input.fi-checkbox-input:checked {
    border-color: rgb(22 163 74);
    background-color: rgb(22 163 74);
}

:where(.dark) .fi-permission-cell input.fi-checkbox-input:checked {
    border-color: rgb(34 197 94);
    background-color: rgb(34 197 94);
}

/* Held but not changeable here — through a role, or because the super admin
   switch is on.

   ⚠ FULL green, not a muted one (Sets, 27.07.2026). It was washed out to show
   the lock, and that put a pale tick next to a switch saying "has everything":
   a screen contradicting itself, and the reading somebody takes away is the one
   they can see. The lock is shown by the cursor instead, which only appears
   when they try. */
.fi-permission-cell input.fi-checkbox-input:disabled {
    opacity: 1;
    cursor: not-allowed;
}
