/* The object picker's layout on every job kind (#671): the header row over a type's
   table (the type, the panel toggle, the Actions menu), the list of types that folds
   away to the left, the tick column's header box, and the space above the list's
   heading. Theme tokens only, so light and dark both follow. */

/* A little more room between the choice cards and the list's heading. */
.qcb-objects-bar {
    margin-top: 0.75rem;
}

/* ---- The header row ---- */

.qots-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qots-title {
    align-items: center;
}

/* "In this backup · 3": always there, beside Actions. */
.qots-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.qots-panel-toggle-sep {
    color: var(--qcb-text-muted);
}

.qots-panel-toggle-count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.qots-panel-toggle[aria-expanded="true"] {
    border-color: var(--qcb-teal-600);
    background: var(--qcb-teal-50);
}

/* Picks a promotion's latest backup doesn't hold: words and a symbol, no coloured label. */
.qots-panel-toggle-note {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: var(--qcb-attention);
}

/* Actions, with its chevron, and its menu's entries with their icons. */
.qots-actions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.qots-actions-list .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.qots-actions-list .dropdown-item > i {
    flex: none;
    font-size: 1rem;
    color: var(--qcb-text-muted);
}

/* ---- The list of types folds away to the left ---- */

.qots-types-fold {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.25rem;
}

.qots-fold-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--qcb-border);
    border-radius: 6px;
    background: var(--qcb-surface);
    color: var(--qcb-text-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.qots-fold-btn:hover {
    background: var(--qcb-hover);
    color: var(--qcb-text);
}

.qots-fold-btn:focus-visible {
    outline: 2px solid var(--qcb-teal-600);
    outline-offset: 2px;
}

/* Folded: the table takes the width; the type's name over it, with the button before
   it, is the way back. */
.qots-picker.is-folded {
    grid-template-columns: minmax(0, 1fr);
}

.qots-picker.is-folded > .qots-types {
    display: none;
}

/* At phone width the list is a select (ui-picker.css), so there is nothing to fold. */
@container qots-picker (max-width: 640px) {
    .qots-fold-btn {
        display: none;
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 767.98px) {
        .qots-fold-btn {
            display: none;
        }
    }
}

/* ---- The tick column's header box: ticks the page shown ---- */

.qots-pagetick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    padding: 0;
    border: 1.5px solid var(--qcb-gray-500);
    border-radius: 0.25em;
    background: var(--qcb-surface);
    color: var(--qcb-on-fill);
    font-size: 0.875rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

.qots-pagetick[aria-checked="true"],
.qots-pagetick[aria-checked="mixed"] {
    border-color: var(--qcb-teal-600);
    background: var(--qcb-teal-600);
    color: var(--qcb-on-fill);
}

.qots-pagetick:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qots-pagetick:focus-visible {
    outline: 2px solid var(--qcb-teal-600);
    outline-offset: 2px;
}
