/* Timekeeper's own styles, on top of Pico CSS. Keep this file small. */

.narrow {
    max-width: 32rem;
    margin-inline: auto;
}

.muted {
    color: var(--pico-muted-color);
}

form.inline {
    margin: 0;
}

form.inline button {
    margin: 0;
    padding: 0.25rem 0.75rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius);
    border-left: 4px solid;
}

.flash-success {
    border-color: var(--pico-ins-color);
    background: color-mix(in srgb, var(--pico-ins-color) 10%, transparent);
}

.flash-error {
    border-color: var(--pico-del-color);
    background: color-mix(in srgb, var(--pico-del-color) 10%, transparent);
}

.error-message {
    white-space: pre-wrap;
}

.page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.inline-choice {
    display: inline-flex;
    gap: 0.25rem;
    margin-right: 1rem;
}

small.error {
    color: var(--pico-del-color);
}

dl.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
}

dl.details dt {
    color: var(--pico-muted-color);
}

dl.details dd {
    margin: 0;
}

/* On narrow screens, let the navigation wrap onto several lines instead
   of making the page wider than the screen. */
header nav,
header nav ul {
    flex-wrap: wrap;
}

/* Time clock */

.clock-card {
    text-align: center;
}

.clock-button {
    width: 100%;
    max-width: 20rem;
    font-size: 1.25rem;
}

.big-number {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0;
}

.negative {
    color: var(--pico-del-color);
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.month-nav h2 {
    margin: 0;
}

dl.summary {
    margin-block: 1rem;
}

table.timesheet tr.day-off td {
    color: var(--pico-muted-color);
}

table.timesheet tr.today td {
    font-weight: bold;
}

table.timesheet tr.needs-checking td {
    background: color-mix(in srgb, var(--pico-del-color) 10%, transparent);
}

table.timesheet .entry {
    display: inline-block;
    margin-right: 1rem;
    white-space: nowrap;
}

table.timesheet .entry a,
table.timesheet .add-entry {
    font-size: 0.85em;
}

table.timesheet .day-note {
    display: inline-block;
    margin-right: 1rem;
    padding: 0 0.4rem;
    border-radius: var(--pico-border-radius);
    background: color-mix(in srgb, var(--pico-primary) 12%, transparent);
    font-size: 0.85em;
}

/* Leave */

.status-pending {
    color: var(--pico-color-amber-550, #b7791f);
}

.status-rejected,
.status-withdrawn {
    color: var(--pico-muted-color);
    text-decoration: line-through;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.button-row form {
    margin: 0;
}

.button-row input[type=text] {
    margin: 0;
    min-width: 12rem;
}

/* Reports */

.report-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.report-tabs a {
    padding-bottom: 0.5rem;
    text-decoration: none;
}

.report-tabs a[aria-current="page"] {
    border-bottom: 3px solid var(--pico-primary);
    font-weight: bold;
}

table.report td,
table.report th {
    white-space: nowrap;
}

/* Audit log: the fields that a change touched. */
tr.changed td {
    background: color-mix(in srgb, var(--pico-mark-background-color) 35%, transparent);
}

.fingerprint {
    font-family: var(--pico-font-family-monospace);
    font-size: 0.8em;
    word-break: break-all;
}

.audit-check button {
    width: auto;
}

td.nowrap {
    white-space: nowrap;
}
