/* Work item list only: preserve the shared theme and other tracker views. */
.ot-list-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.ot-list-page-head > * {
    min-width: 0;
}

.ot-list-page-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        'context primary'
        'secondary secondary';
    gap: 0.45rem 0.75rem;
    width: max-content;
    max-width: 100%;
    justify-self: end;
    align-items: start;
}

.ot-list-page-context {
    grid-area: context;
    justify-self: start;
    min-width: 0;
}

.ot-list-page-primary {
    grid-area: primary;
    justify-self: end;
    white-space: nowrap;
}

.ot-list-page-secondary {
    grid-area: secondary;
    justify-self: end;
    flex-wrap: nowrap !important;
    align-items: start !important;
    min-width: 0;
}

.ot-list-page-head :is(.ot-list-page-primary .btn, .ot-list-page-secondary .btn, #saved-filter-select) {
    height: 2rem;
    min-height: 2rem;
}

.ot-list-page-head .ot-quick-jump .input-group > * {
    height: 2rem !important;
    min-height: 2rem !important;
}

.ot-list-page-head .ot-quick-jump-toggle {
    width: 1.75rem;
}

.ot-list-page-head .ot-saved-filter-controls {
    display: grid;
    grid-template-columns: minmax(9rem, 10.5rem) auto auto auto;
    grid-template-rows: auto auto;
    align-items: start;
    justify-content: start;
    column-gap: 0.35rem;
    row-gap: 0.15rem;
    flex: 0 0 auto;
    max-width: none;
    padding-left: 0.65rem;
}

.ot-list-page-head #saved-filter-select {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    max-width: none;
}

.ot-list-page-head #save-filter-form {
    grid-column: 2;
    grid-row: 1;
}

.ot-list-page-head #reset-saved-filter-btn {
    grid-column: 3;
    grid-row: 1;
}

.ot-list-page-head #delete-filter-form {
    grid-column: 4;
    grid-row: 1;
}

.ot-list-page-head #saved-filter-state {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
}

.ot-list-page-head #work-item-bulk-state:empty {
    display: none;
}

.ot-list-page-head #kanban-toggle,
.ot-list-page-head #bulk-toggle {
    align-self: flex-start;
}

.ot-list-page-head #work-item-bulk-state {
    font-size: 0.78rem;
    color: #5e6875;
    white-space: nowrap;
}

#work-item-list-shell .ot-list-editor-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0 0;
}

#work-item-list-shell .ot-list-editor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.15rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid #aeb8c2;
    border-radius: 0.3rem;
    background: #fff;
    color: #263645;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    cursor: pointer;
    transition: none;
}

#work-item-list-shell .ot-list-editor-button[aria-pressed='true'] {
    color: #fff;
    background: #0088cc;
    border-color: #0088cc;
}

#work-item-list-shell .ot-list-editor-button[aria-pressed='false']:hover {
    background: #eef7fc;
    border-color: #0088cc;
}

#work-item-list-shell .ot-list-editor-button:focus-visible {
    outline: 2px solid #0876b8;
    outline-offset: 2px;
}

#work-item-list-shell .ot-list-editor-status {
    margin-left: 0.35rem;
    color: #66717e;
    font-size: 0.8rem;
}

#work-item-list-shell #work-item-query-editor[hidden],
#work-item-list-shell #work-item-structured-editor[hidden] {
    display: none !important;
}

#work-item-list-shell .ot-list-query-bar {
    padding: 0.65rem 0 1rem;
    border-bottom: 1px solid #e6e9ef;
}

#work-item-list-shell #work-item-query-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

#work-item-list-shell .ot-list-filter-shell {
    padding: 0.65rem 0 1rem;
}

@media (min-width: 992px) {
    #work-item-list-shell .ot-list-filter-grid-external {
        grid-template-columns: repeat(5, minmax(0, 0.9fr)) minmax(0, 0.75fr);
    }
}

#work-item-list-shell .ot-list-query-error {
    margin: 0.75rem 0 0;
    overflow-wrap: anywhere;
}

#work-item-list-shell .ot-stats {
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin: 0.75rem 0 0.9rem;
}

#work-item-list-shell .ot-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    max-width: 100%;
    padding: 0.33rem 0.6rem;
    border-radius: 0.4rem;
    background: #fff;
    line-height: 1.3;
}

#work-item-list-shell .ot-stat-total {
    background: #eef7fc;
    border-color: #b9dfef;
}

#work-item-list-shell .ot-stat .label {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #52606d;
    font-size: 0.78rem;
    font-weight: 600;
}

#work-item-list-shell .ot-stat .value {
    margin: 0;
    color: #1e526f;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

#work-item-list-shell .ot-list-table {
    min-width: 54rem;
}

#work-item-list-shell .ot-list-table col.col-key {
    width: 6.2rem;
}

#work-item-list-shell .ot-list-table col.col-project {
    width: 6.9rem;
}

#work-item-list-shell .ot-list-table col.col-type {
    width: 6rem;
}

#work-item-list-shell .ot-list-table col.col-status {
    width: 7rem;
}

#work-item-list-shell .ot-list-table col.col-version {
    width: 5.5rem;
}

#work-item-list-shell .ot-list-table col.col-assignee {
    width: 8rem;
}

#work-item-list-shell .ot-list-table col.col-created,
#work-item-list-shell .ot-list-table col.col-updated {
    width: 7.5rem;
}

#work-item-list-shell .ot-list-table thead th {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #d9e0e6;
    background: #f8fafb;
    color: #435160;
    font-size: 0.75rem;
    font-weight: 700;
}

#work-item-list-shell .ot-list-table thead th a {
    max-width: 100%;
}

#work-item-list-shell .ot-list-table .ot-item-row td {
    padding-top: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 0;
    vertical-align: middle;
}

#work-item-list-shell .ot-list-table .ot-title-row td {
    padding: 0.15rem 0.75rem 0.7rem 1.1rem;
    border-bottom: 1px solid #dfe5ea;
    background: var(--ot-row-bg, #f8fafb);
    white-space: normal;
    overflow-wrap: anywhere;
}

#work-item-list-shell .ot-list-title-link {
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.4;
}

#work-item-list-shell .ot-list-title-link:hover,
#work-item-list-shell .ot-list-key-cell a:hover {
    text-decoration: underline !important;
}

#work-item-list-shell .ot-list-table :is(.ot-chip, .ot-type-badge, .ot-status) {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

#work-item-list-shell .ot-list-table .ot-inline-display {
    max-width: 100%;
}

#work-item-list-shell .ot-inline-edit {
    flex-wrap: wrap;
}

#work-item-list-shell .ot-inline-save-feedback {
    flex-basis: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

#work-item-list-shell .ot-list-table .ot-list-empty-value,
#work-item-list-shell .ot-list-table .ot-list-date-cell {
    color: #74808c;
}

#work-item-list-shell .ot-list-table .ot-list-date-cell {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

#work-item-list-shell .ot-list-table .ot-assignee-name-line {
    gap: 0.2rem;
}

#work-item-list-shell .ot-list-table .ot-assignee-name-line .ot-inline-edit {
    flex: 0 1 auto;
    min-width: 0;
}

#work-item-list-shell .ot-list-table .ot-assignee-name-line .ot-assignee-name {
    white-space: nowrap;
}

#work-item-list-shell .ot-list-table .ot-assignee-name-line .ot-quick-timelog-open {
    display: inline-flex;
    flex: 0 0 1.75rem;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: 0;
    border-radius: 0.35rem;
    vertical-align: middle;
}

#work-item-list-shell .ot-list-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    white-space: normal;
}

#work-item-list-shell .ot-list-empty-title {
    color: #263645;
    font-weight: 700;
}

#work-item-list-shell .ot-list-empty-detail {
    margin-top: 0.25rem;
    color: #687683;
    font-size: 0.85rem;
}

#work-item-list-feedback {
    min-height: 0;
    overflow-wrap: anywhere;
}

#work-item-list-feedback:not(:empty) {
    margin: 0.6rem 0 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
}

#work-item-list-feedback[data-state='loading'] {
    color: #415365;
    background: #f2f6f9;
    border-color: #dce6ee;
}

#work-item-list-feedback[data-state='error'] {
    color: #842029;
    background: #f8e8e9;
    border-color: #eab9bd;
}

#work-item-list-feedback[data-state='success'] {
    color: #185d39;
    background: #e8f5ed;
    border-color: #b7dec6;
}

@media (max-width: 1199.98px) {
    .ot-list-page-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .ot-list-page-tools {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 767.98px) {
    .ot-list-page-tools {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            'context'
            'primary'
            'secondary';
        justify-items: start;
        text-align: left !important;
    }

    .ot-list-page-context,
    .ot-list-page-secondary {
        justify-self: start;
    }

    .ot-list-page-context,
    .ot-list-page-secondary {
        flex-wrap: wrap !important;
    }

    .ot-list-page-head .ot-saved-filter-controls {
        padding-left: 0;
        border-left: 0;
    }

    .ot-list-page-secondary {
        gap: 0.4rem !important;
    }

    #work-item-list-shell .ot-list-editor-status {
        flex-basis: 100%;
        margin-left: 0;
    }
}
