.WorkhoursForm {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.WorkhoursForm-controlsRow {
    flex-grow: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    /* The z-index is set to be higher than that of .WorkhoursForm-gridContainer */
    z-index: 5;
}

.WorkhoursForm-dayStartAndTimeWorked,
.WorkhoursForm-timeInputGroup,
.WorkhoursForm-otherInputs {
    display: flex;
}

.WorkhoursForm-dayStartAndTimeWorked,
.WorkhoursForm-timeInputGroup {
    flex-shrink: 0;
}

.WorkhoursForm-weekendsToggle {
    padding-top: 10px;
}

.WorkhoursForm-otherInputs {
    flex-shrink: 1;
    flex-grow: 1;
    display: flex;
}

.WorkhoursForm-timezoneGroup {
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 25em;
}

.WorkhoursForm-weekendsFormGroup {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 12em;
    max-width: 20em;
}

.WorkhoursForm-hoursInput,
.WorkhoursForm-minutesInput {
    width: 70px;
}

.WorkhoursForm-hoursInput {
    margin-right: 10px;
}

.WorkhoursForm-hoursInput.is-warning,
.WorkhoursForm-minutesInput.is-warning {
    border-color: #ffc107;
}

.WorkhoursForm-minutesInput.is-error {
    border-color: var(--danger);
}

.WorkhoursForm-legendPopoverContainer {
    display: none;
}

.popover {
    max-width: 500px;
}

.WorkhoursForm-gridContainer {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 100%;
    margin: 15px -15px -15px;

    /* The z-index is set to be lower than that of .WorkhoursForm-controlsRow */
    z-index: 1;
}

.WorkhoursForm-grid {
    width: 100%;
    border-collapse: collapse;
}

.WorkhoursForm-gridYearRow {
    background-color: #767676;
    border: 1px solid #ccc;
    color: var(--text-inverse);
    text-align: center;
}

.WorkhoursForm-gridCell,
.WorkhoursForm-gridColumnHeader,
.WorkhoursForm-gridRowHeader {
    user-select: none;
}

.WorkhoursForm-gridFillerCell {
    background-color: #f2f2f2;
}

.WorkhoursForm-gridCell {
    border: 1px solid #ccc;
    text-align: center;
    height: 30px;
    min-width: 30px;
    cursor: pointer;
}

.WorkhoursForm-gridCell.is-selected {
    border: 2px solid var(--primary);
    font-weight: var(--font-weight-bold);
}

.WorkhoursForm-gridCell.is-self {
    background-color: #fde899;
}

.WorkhoursForm-gridCell.is-ancestor {
    background: linear-gradient(360deg, var(--surface-default) 3.51%, #fde899 97.37%);
}

.WorkhoursForm-gridCell.is-disabled {
    background-color: #f2f2f2;
    color: rgb(0 0 0 / 50%);
    cursor: default;
}

.WorkhoursForm-gridCell.is-past {
    position: relative;
    overflow: hidden;
}

/* This renders the strikethrough for days in the past */
.WorkhoursForm-gridCell.is-past::before {
    position: absolute;
    top: 50%;
    left: -25%;
    content: "";
    height: 1px;
    width: 150%;
    background-color: #ccc;
    transform-origin: center;
    transform: rotate(-45deg);
}

.WorkhoursForm-gridCell.is-today {
    background-color: var(--primary);
    color: var(--text-inverse);
}

.WorkhoursForm-unsavedCellIndicatorContainer {
    position: relative;
    padding: 0;
    margin: 0;
}

.WorkhoursForm-unsavedCellIndicator {
    position: absolute;
    margin-top: -3px;
}

.WorkhoursForm-dayPopover {
    font-size: 12px;
    text-align: center;
}

.WorkhoursForm-cornerCell {
    border: 1px solid #ccc;
    background-color: #f2f2f2;
    text-align: center;
    color: var(--primary);
}

.WorkhoursForm-gridColumnHeader {
    text-align: center;
    background-color: #f2f2f2;
    font-weight: var(--font-weight-regular);
}

.WorkhoursForm-gridRowHeader {
    padding: 0 1em 0 5px;
    border: 1px solid #ccc;
    background-color: #f2f2f2;
    cursor: pointer;
    font-weight: var(--font-weight-regular);
}

.WorkhoursForm-gridCell:not(.is-disabled):hover {
    background-color: var(--interactive-primary-13);
}
