/* The crew member's day. Built for a phone held in one hand on a site, so the
   controls stay large and the day's total is readable at arm's length. */

.my-day__bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.my-day__step {
    min-width: 3rem;
    font-size: 1.4rem;
    line-height: 1;
}

.my-day__date input {
    min-width: 9rem;
}

.my-day__total {
    margin-left: auto;
    font-size: 1.6rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Scoped one level deeper than the class alone: FeatherCSS ships
   `ul.reset { display: inline-block }` and `ul.reset li { display: inline-block }`,
   which outrank a bare `.my-day__list` / `.my-day__entry` and quietly turn the whole
   layout back into inline text. */
.my-day .my-day__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Two columns: what and how long. Everything else spans the full width underneath,
   so nothing is ever squeezed into a column too narrow to read. */
.my-day .my-day__entry {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border, #333);
    border-radius: 0.4rem;
}

.my-day__entry-job {
    font-weight: 600;
}

.my-day__entry-duration {
    justify-self: end;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.my-day__entry-meta,
.my-day__entry-note {
    grid-column: 1;
    opacity: 0.75;
    font-size: 0.9rem;
}

.my-day__entry-edit {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: end;
}

/* No note means no third row for the button to sit on. */
.my-day .my-day__entry:not(:has(.my-day__entry-note)) .my-day__entry-edit {
    grid-row: 2;
}

.my-day .my-day__empty {
    opacity: 0.7;
    padding: 0.75rem 0;
}

.my-day__times {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.my-day__times label {
    flex: 1 1 7rem;
}

.my-day__error {
    color: var(--color-danger, #e5484d);
}

.my-day__mark {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--color-warning, #f5a623);
    background: var(--color-bg-2, rgba(127, 127, 127, 0.08));
}

@media (max-width: 560px) {
    .my-day__total {
        width: 100%;
        margin-left: 0;
    }
}
