/* Roster standard grid cells, dense inputs, and layout-mode control sizing. */

.roster-grid .slot-staff-cell {
    min-width: 0;
    padding: 0 !important;
}

.roster-grid .slot-shift-type-cell {
    min-width: 0;
    padding: 0 !important;
}

.roster-grid-day-section {
    display: grid;
    grid-auto-rows: var(--roster-grid-row-height);
    height: calc(var(--roster-grid-row-height) * var(--roster-day-row-count));
    min-height: calc(var(--roster-grid-row-height) * var(--roster-day-row-count));
    box-sizing: border-box;
}

.roster-grid .day-row {
    display: grid;
    grid-template-columns: var(--roster-grid-columns);
    height: var(--roster-grid-row-height);
    min-height: var(--roster-grid-row-height);
    box-sizing: border-box;
}

.roster-grid .day-row > [role="gridcell"] {
    height: var(--roster-grid-row-height);
    min-height: var(--roster-grid-row-height);
    border-top: 1px solid var(--app-border);
    border-bottom: 0;
    border-left: 0;
    border-right: 1px solid var(--app-border);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.roster-grid .roster-block-start {
    border-left: 2px solid var(--app-border-strong) !important;
}

.roster-grid .roster-block-end {
    border-right: 1px solid var(--app-border) !important;
}

.roster-grid .slot-empty-cell {
    background-color: inherit;
}

.roster-grid .roster-shift-create-plus-cell .slot-cell-static {
    color: var(--bs-success);
    font-size: 1.15rem;
    font-weight: 800;
    justify-content: center;
    opacity: 0;
    text-align: center;
    transition: opacity 140ms ease;
}

.roster-shift-dialog-time-picker .time-picker-trigger-button .js-time-picker-label {
    margin-inline: auto;
    text-align: center;
}

.roster-grid .roster-shift-create-group-cell.is-roster-shift-group-highlighted {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    transform: none;
}

.roster-grid .roster-shift-create-group-cell.roster-block-start.is-roster-shift-group-highlighted {
    border-left-color: var(--app-accent-softer) !important;
}

.roster-grid .roster-shift-create-group-cell.roster-block-end.is-roster-shift-group-highlighted {
    border-right-color: var(--app-accent-softer) !important;
}

.roster-grid .roster-shift-create-plus-cell:hover .slot-cell-static,
.roster-grid .roster-shift-create-plus-cell:focus-visible .slot-cell-static,
.roster-grid .roster-shift-create-plus-cell.is-roster-shift-group-highlighted .slot-cell-static {
    opacity: 1;
}

.roster-grid .slot-closed-cell {
    background-color: var(--roster-empty);
}

.roster-grid .form-control-sm,
.roster-grid .form-select-sm {
    font-size: var(--roster-text-sm);
    border-color: transparent;
    border-radius: 0;
}

.roster-grid .roster-shift-launcher {
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.roster-grid .roster-shift-launcher:hover,
.roster-grid .roster-shift-launcher:focus-visible,
.roster-grid .roster-shift-launcher.is-roster-shift-group-highlighted {
    z-index: 4;
    background: color-mix(in srgb, var(--app-surface-2) 86%, var(--app-accent) 14%);
    box-shadow: inset 0 0 0 1px var(--app-accent-softer), 0 0.45rem 0.9rem var(--app-shadow-md-raw);
    transform: translateY(-1px);
}

.roster-grid .roster-shift-launcher:focus-visible {
    box-shadow: inset 0 0 0 2px var(--app-accent);
}

.roster-layout-mode-group .btn {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
}
