/*
 * staff.css — a working-time model's week at a glance (Patterns/Personal): the hours per
 * weekday in one strip, under the model in force on an employee's page and under the choice of a
 * model in the dialog that assigns one.
 *
 * <dl class="app-staff-week">
 *   <div class="app-staff-week-day"><dt><abbr title="Montag">Mo</abbr></dt><dd>8</dd></div>
 *   <div class="app-staff-week-day" data-off><dt>…</dt><dd>frei</dd></div>
 *   …
 * </dl>
 *
 * In a link list, the strip stands under the row of its model, inside the row's entry, at the
 * row's inset (the link keeps the row; the strip only shows):
 *   <li class="app-link-list-entry"><a class="app-link-list-item">…</a><div class="app-staff-week-row">[week]</div></li>
 *
 * Seven equal cells in a field's frame, ruled between: the day in label size and muted, the
 * hours under it as a value with tabular figures; a day off in muted text at body weight. The
 * strip shares the width it is given, so it fits a phone at 320 as it does a dialog.
 */
@layer components {
    .app-staff-week {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        overflow: clip;
        border-radius: var(--app-radius-field);
        box-shadow: inset 0 0 0 var(--app-border-width) var(--app-color-line);
    }

    .app-staff-week-day {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-inline-size: 0;
        padding: var(--app-space-term) 0;
    }

    .app-staff-week-day + .app-staff-week-day {
        box-shadow: inset var(--app-border-width) 0 0 var(--app-color-line);
    }

    .app-staff-week-day > dt {
        color: var(--app-color-text-muted);
        font-size: var(--app-text-label-size);
        font-weight: var(--app-text-term-weight);
        line-height: var(--app-text-label-leading);
    }

    .app-staff-week-day abbr {
        text-decoration: none;
    }

    .app-staff-week-day > dd {
        color: var(--app-color-text);
        font-weight: var(--app-text-value-weight);
        line-height: var(--app-text-body-leading);
        font-variant-numeric: tabular-nums;
    }

    .app-staff-week-day[data-off] > dd {
        color: var(--app-color-text-muted);
        font-weight: var(--app-text-body-weight);
    }

    .app-staff-week-row {
        padding-block: 0 var(--app-space-link-list-y);
        padding-inline: var(--app-space-link-list-x);
    }

    /* Forced colours (a Windows contrast theme): the frame and the rules are outlines. */
    @media (forced-colors: active) {
        .app-staff-week {
            outline: var(--app-border-width) solid var(--app-color-forced-line);
            outline-offset: calc(-1 * var(--app-border-width));
        }

        .app-staff-week-day + .app-staff-week-day {
            border-inline-start: var(--app-border-width) solid var(--app-color-forced-line);
        }
    }
}
