/* The employees' absences: the employee's own page, the validation page and the leave rights.
   Built on imports.css (gi-) and licences.css (gl- fields, tables, drawers and dialogs); what the
   absences add is prefixed gab-, apart from the administration's ga- kit. The CDOS transmission
   page is a treasury page and keeps gy-. */

/* A half-day is a checkbox beside its date, not a field of its own. */
.gab-half {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--dark-fg-2);
    font-size: 14px;
}

.gab-half input { width: 22px; height: 22px; accent-color: var(--thonon-yellow); }

/* ── The employee's own page ─────────────────────────────────────────────── */

/* What is left, in the coach's turquoise: the gauge's third colour. */
.gab-kpi-left { display: contents; }
.gab-kpi-left .gi-kpi { --tone: #2EC4B6; }

.gab-gauge {
    display: flex;
    height: 12px;
    margin-top: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--thonon-night);
    box-shadow: inset 0 0 0 1px var(--dark-border-2);
}

.gab-gauge i { display: block; height: 100%; }
.gab-gauge__taken { background: var(--thonon-yellow); }
.gab-gauge__pending { background: var(--thonon-blue-bright); }
.gab-gauge__left { background: #2EC4B6; }

.gab-formcard { box-shadow: inset 0 -4px 0 var(--thonon-yellow); }

.gab-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.gab-fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gab-fields__wide { grid-column: 1 / -1; }
.gab-count { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.gab-states { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 16px; margin: 0; }
.gab-states dt { margin: 0; }
.gab-states dd { margin: 0; text-align: right; font-size: 13px; color: var(--dark-fg-2); }

.gab-rows { padding: 0; gap: 0; overflow: hidden; }

.gab-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--dark-border-1);
}

.gab-row:first-child { border-top: 0; }
.gab-row__kind { margin: 0; font: 800 18px/1.1 var(--font-condensed); letter-spacing: 0.04em; text-transform: uppercase; }
.gab-row__days { font: 400 28px/1 var(--font-display); text-align: right; }
.gab-row__days sup { font: 700 16px/1 var(--font-condensed); }
.gab-row__days small { display: block; font: 700 12px/1.2 var(--font-condensed); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dark-fg-3); }
.gab-row__line, .gab-row__wide { grid-column: 1 / -1; }
.gab-row__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gab-row__end { margin-left: auto; }

@media (max-width: 699px) {
    .gab-fields, .gab-fields--three { grid-template-columns: minmax(0, 1fr); }
    .gab-row { padding: 16px; }
}

/* ── The committee's page ────────────────────────────────────────────────── */

/* The tabs on the left, the month on the right, on one line. */
.gab-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gab-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* The employees to record an absence for: each card is its own switch. */
.gab-picks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gab-pick {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--dark-border-1);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gab-pick[aria-checked="true"] {
    background: rgba(52, 164, 224, 0.12);
    box-shadow: inset 0 0 0 1.5px var(--thonon-blue-bright);
}

.gab-pick:focus-visible {
    outline: 2px solid var(--thonon-yellow);
    outline-offset: 2px;
}

.gab-pick .gl-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid var(--dark-border-2);
    background: var(--thonon-graphite);
}

.gab-pick__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gab-pick__text b { font-weight: 600; }
.gab-pick__text small { font-size: 13px; color: var(--dark-fg-2); }
.gab-pick__check { display: inline-flex; color: var(--thonon-blue-bright); }

/* A row's buttons, under it; the gauge across it, with its three counts. */
.gab-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
}

.gab-gauge--row {
    grid-column: 1 / -1;
    height: 10px;
    margin-top: 4px;
}

.gab-tally {
    gap: 6px 16px;
    font-size: 14px;
    color: var(--dark-fg-2);
}

.gab-tally b { color: #fff; font-weight: 700; }

.gab-sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: -1px;
}
