/* Isolated Book staff day-view preview — does not affect live Book staff layout */

.staff-book-day-preview {
    display: block;
}

.staff-book-day-preview__banner {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.staff-book-day-preview__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.staff-book-day-preview__week-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem 0.85rem;
}

.staff-book-day-preview__week-nav label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--app-text-muted, #1e293b);
    margin-bottom: 0.2rem;
}

.staff-book-day-preview__week-input {
    width: 10.5rem;
}

.staff-book-day-preview__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-left: auto;
}

.staff-book-day-preview__week-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.65rem;
    margin-top: 0.75rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #0b6bcb;
    border-radius: 0.65rem;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 1px 2px rgba(11, 107, 203, 0.12);
}

.staff-book-day-preview__week-badge-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0958a8;
}

.staff-book-day-preview__week-badge-range {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.staff-book-coverage-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.staff-book-coverage-strip__item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 4.25rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.staff-book-coverage-strip__item:hover:not(:disabled),
.staff-book-coverage-strip__item:focus-visible {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.staff-book-coverage-strip__item:disabled {
    cursor: default;
    opacity: 0.85;
}

.staff-book-coverage-strip__item.is-focused {
    border-color: #ea580c;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.28);
}

.staff-book-coverage-strip__item.is-warn {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.staff-book-coverage-strip__item.is-holiday {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.staff-book-coverage-strip__item.is-warn.is-focused {
    border-color: #ea580c;
    background: #ffedd5;
    color: #9a3412;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.28);
}

.staff-book-coverage-strip__count {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.staff-book-day-boards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.staff-book-day-board {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.65rem 0.7rem;
    scroll-margin-top: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 14rem;
}

.staff-book-day-board.is-focused {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.25);
    background: #fffaf5;
}

.staff-book-day-board.is-holiday {
    background: #f8fafc;
}

.staff-book-day-board.is-holiday.is-focused {
    background: #fff7ed;
}

.staff-book-day-board__header {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    margin: 0 0 0.55rem;
    padding: 0 0 0.45rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.staff-book-day-board__header:hover:not(:disabled) {
    border-bottom-color: #fdba74;
}

.staff-book-day-board__header:focus-visible {
    outline: 2px solid #ea580c;
    outline-offset: 2px;
    border-radius: 0.35rem;
}

.staff-book-day-board__header:disabled {
    cursor: default;
}

.staff-book-day-board.is-focused .staff-book-day-board__header {
    border-bottom-color: #fb923c;
}

.staff-book-day-board.is-focused .staff-book-day-board__title {
    color: #c2410c;
}

.staff-book-day-board__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.staff-book-day-board__meta {
    font-size: 0.6875rem;
    color: var(--app-text-muted, #1e293b);
}

.staff-book-day-board__badge {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.staff-book-day-board__chips {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.35rem;
    align-items: stretch;
}

.staff-book-day-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    max-width: none;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.staff-book-day-chip:hover:not(:disabled),
.staff-book-day-chip:focus-visible {
    border-color: #94a3b8;
    background: #f8fafc;
}

.staff-book-day-chip:disabled {
    opacity: 0.7;
    cursor: wait;
}

.staff-book-day-chip--scheduled {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}

.staff-book-day-chip--available {
    border-style: dashed;
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1e40af;
}

.staff-book-day-chip__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
}

.staff-book-day-chip__time {
    font-size: 0.6875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
}

.staff-book-day-board__assign {
    display: flex;
    align-items: stretch;
    margin-top: auto;
    padding-top: 0.35rem;
}

.staff-book-day-board__assign .form-select {
    width: 100%;
    min-width: 0;
}

.staff-book-day-board__empty {
    font-size: 0.75rem;
    color: var(--app-text-muted, #1e293b);
}

@media (max-width: 768px) {
    .staff-book-day-boards {
        grid-template-columns: 1fr;
    }
}

/* Assign / edit modal — sticky week availability summary */
.staff-assign-modal .modal-body {
    max-height: min(70vh, 32rem);
    overflow-y: auto;
}

.staff-assign-avail-summary {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0.75rem 1rem 0.65rem;
    background: linear-gradient(180deg, #fff 72%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.staff-assign-avail-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    align-items: baseline;
    margin-bottom: 0.55rem;
}

.staff-assign-avail-summary__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b6bcb;
}

.staff-assign-avail-summary__hours {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
}

.staff-assign-avail-summary__hours span {
    color: #64748b;
    font-weight: 600;
}

.staff-assign-avail-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.staff-assign-avail-day {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.35rem 0.25rem;
    text-align: center;
    min-height: 3.55rem;
}

.staff-assign-avail-day__name {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.12rem;
}

.staff-assign-avail-day__time {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
}

.staff-assign-avail-day__status {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

/* Assigning — orange */
.staff-assign-avail-day--assigning {
    border-color: #ea580c;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.22);
}

.staff-assign-avail-day--assigning .staff-assign-avail-day__name,
.staff-assign-avail-day--assigning .staff-assign-avail-day__status {
    color: #c2410c;
}

/* Assigned — teal */
.staff-assign-avail-day--assigned {
    border-color: #14b8a6;
    background: #f0fdfa;
    color: #115e59;
}

.staff-assign-avail-day--assigned .staff-assign-avail-day__status {
    color: #0f766e;
}

/* Available — blue */
.staff-assign-avail-day--available {
    border-color: #38bdf8;
    background: #eff6ff;
    color: #075985;
}

.staff-assign-avail-day--available .staff-assign-avail-day__status {
    color: #0284c7;
}

/* Unavailable — slate */
.staff-assign-avail-day--unavailable {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #64748b;
}

.staff-assign-avail-day--unavailable .staff-assign-avail-day__status {
    color: #475569;
}

.staff-assign-avail-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-top: 0.55rem;
}

.staff-assign-avail-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #475569;
}

.staff-assign-avail-legend__item::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.staff-assign-avail-legend__item--assigning::before {
    background: #ea580c;
}

.staff-assign-avail-legend__item--assigned::before {
    background: #14b8a6;
}

.staff-assign-avail-legend__item--available::before {
    background: #38bdf8;
}

.staff-assign-avail-legend__item--unavailable::before {
    background: #94a3b8;
}

.staff-assign-modal__form {
    padding: 0.85rem 1rem 1rem;
}

@media (max-width: 576px) {
    .staff-assign-avail-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
