@charset "utf-8";

/* Staff schedule: week grid — day columns × 30-min slots (10–24). */

.staff-cal-wrap {
    margin-bottom: 32px;
}

.staff-cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.staff-cal-grid {
    --staff-hour-count: 14;
    --staff-slot-count: 28;
    --staff-slot-px: 18px;
    --staff-gutter: 52px;
    display: grid;
    grid-template-columns: var(--staff-gutter) repeat(var(--staff-col-count, 7), minmax(88px, 1fr));
    min-width: calc(var(--staff-gutter) + var(--staff-col-count, 7) * 88px);
}

.staff-cal-gutter {
    position: relative;
    height: calc(var(--staff-slot-count) * var(--staff-slot-px));
    margin-top: 44px;
}

.staff-cal-gutter-slot {
    position: absolute;
    left: 0;
    right: 4px;
    font-size: 12px;
    opacity: 0.55;
    transform: translateY(-50%);
    text-align: right;
}

.staff-cal-col {
    border-left: 1px solid #ddd;
    min-width: 0;
}

.staff-cal-col.is-today .staff-cal-col-head {
    font-weight: 700;
}

.staff-cal-col.is-today .staff-cal-col-body {
    background: rgba(0, 0, 0, 0.03);
}

.staff-cal-col-head {
    height: 44px;
    padding: 8px 6px 0;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.staff-cal-col-body {
    position: relative;
    height: calc(var(--staff-slot-count) * var(--staff-slot-px));
    touch-action: none;
    user-select: none;
}

.staff-cal-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid #ddd;
    pointer-events: none;
}

.staff-cal-hour-line.is-half {
    border-top-color: #f0f0f0;
}

.staff-cal-shift {
    position: absolute;
    left: 3px;
    right: 3px;
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 13px;
    padding: 3px 5px;
    overflow: hidden;
    cursor: default;
    z-index: 2;
    box-sizing: border-box;
    text-align: left;
}

.staff-cal-shift:hover,
.staff-cal-shift:focus-within {
    overflow: visible;
    z-index: 8;
}

.staff-cal-shift-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    text-align: left;
    padding-right: 20px;
}

.staff-cal-shift-del {
    display: block;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0 0 0 auto;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 21px;
    line-height: 16px;
    text-align: right;
    cursor: pointer;
    opacity: 1;
    overflow: visible;
}

.staff-cal-shift-tools {
    position: absolute;
    top: 1px;
    right: 1px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    opacity: 0;
    z-index: 3;
    line-height: 16px;
}

.staff-cal-shift:hover .staff-cal-shift-tools,
.staff-cal-shift:focus-within .staff-cal-shift-tools {
    opacity: 1;
}

.staff-cal-assign {
    position: relative;
    line-height: 16px;
}

.staff-cal-assign-toggle {
    display: block;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 21px;
    line-height: 16px;
    text-align: right;
    cursor: pointer;
    overflow: visible;
}

.staff-cal-shift.is-open .staff-cal-assign-toggle {
    color: #000;
}

.staff-cal-assign-menu {
    position: absolute;
    top: 0;
    right: 100%;
    margin-right: 4px;
    min-width: 96px;
    max-height: 160px;
    overflow: auto;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    z-index: 20;
}

.staff-cal-assign-item {
    display: block;
    width: 100%;
    padding: 4px 8px;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 11px;
    line-height: 14px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.staff-cal-assign-item:hover {
    background: #eee;
}

.staff-cal-assign-item.is-current {
    text-decoration: underline;
}

.staff-cal-shift.is-open .staff-cal-shift-del {
    color: #000;
}

.staff-cal-shift[data-tone="1"] { background: #1a1a1a; }
.staff-cal-shift[data-tone="2"] { background: #333; }
.staff-cal-shift[data-tone="3"] { background: #444; }
.staff-cal-shift[data-tone="4"] { background: #222; }
.staff-cal-shift[data-tone="5"] { background: #555; }

.staff-cal-shift:hover {
    outline: 1px solid #fff;
}

.staff-cal-shift.is-open {
    background: #fff;
    color: #000;
    border: 1px dashed #000;
    cursor: pointer;
}

.staff-cal-shift.is-open:hover {
    outline: 1px solid #000;
    background: #f7f7f7;
}

.staff-cal-shift-claim {
    position: absolute;
    top: 1px;
    right: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 11px;
    line-height: 14px;
    text-align: right;
    text-decoration: underline;
    cursor: pointer;
    opacity: 0;
    z-index: 3;
}

.staff-cal-shift.is-open:hover .staff-cal-shift-claim,
.staff-cal-shift.is-open:focus-within .staff-cal-shift-claim,
.staff-cal-shift.is-mine:hover .staff-cal-shift-claim,
.staff-cal-shift.is-mine:focus-within .staff-cal-shift-claim {
    opacity: 1;
}

.staff-cal-shift.is-toggleable {
    cursor: pointer;
}

.staff-cal-shift.is-mine:hover {
    outline: 1px solid #fff;
}

.staff-cal-shift.is-locked {
    cursor: default;
    opacity: 0.92;
}

.staff-cal-selection {
    position: absolute;
    left: 3px;
    right: 3px;
    background: rgba(0, 140, 60, 0.28);
    border: 1px solid #080;
    color: #040;
    font-size: 12px;
    line-height: 14px;
    padding: 4px 6px;
    pointer-events: none;
    z-index: 5;
    box-sizing: border-box;
}

.staff-cal-empty {
    opacity: 0.55;
    margin: 12px 0;
}
