/*
 * t2-listing-profile-picker.css
 * T2 composition ONLY for the article-list listing-profile picker.
 *
 * Visuals come from the component-scoped design-system artifact
 * (/vendor/topdata-design-system/modal-form.css). This file handles layout and
 * anchor wiring only. Do not declare --td-* tokens, redefine .td-* primitives,
 * or use raw colours.
 */

.t2-listing-profile-picker__trigger {
    float: right;
    margin-left: var(--td-space-2);
}

.t2-listing-profile-picker__trigger .td-button__label {
    max-width: 16rem;
}

.t2-listing-profile-picker__modal[role="dialog"] {
    /* Extra attribute specificity: the legacy shell loads topdata-ui-kit.css
       after this file, whose `.td-modal { z-index: 40 }` would otherwise win
       the cascade and drop the picker below the floatThead sticky header
       (z-index 1001). */
    z-index: var(--td-z-modal);
}

.t2-listing-profile-picker__search {
    margin-bottom: var(--td-space-3);
}

.t2-listing-profile-picker__busy {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--td-space-2);
    background-color: color-mix(in srgb, var(--td-color-surface) 78%, transparent);
    color: var(--td-color-fg-muted);
    cursor: progress;
}

.t2-listing-profile-picker__busy-label {
    font-family: var(--td-font-body);
    font-size: var(--td-text-sm);
}

.t2-listing-profile-picker__list {
    display: flex;
    flex-direction: column;
    gap: var(--td-space-1);
    max-height: 20rem;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.t2-listing-profile-picker__row {
    display: flex;
    align-items: center;
    gap: var(--td-space-1);
    border-radius: var(--td-radius-sm);
}

.t2-listing-profile-picker__row--highlighted {
    background-color: var(--td-color-surface-hover);
}

.t2-listing-profile-picker__select {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: var(--td-space-2);
    min-width: 0;
    padding: var(--td-space-2) var(--td-space-3);
    border: 0;
    border-radius: var(--td-radius-sm);
    background: transparent;
    color: var(--td-color-fg);
    cursor: pointer;
    font-family: var(--td-font-body);
    font-size: var(--td-text-sm);
    text-align: start;
}

.t2-listing-profile-picker__select:focus-visible {
    outline: 2px solid var(--td-color-focus);
    outline-offset: 2px;
}

.t2-listing-profile-picker__check {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: var(--td-color-primary);
}

.t2-listing-profile-picker__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t2-listing-profile-picker__edit {
    flex: none;
    margin-inline-end: var(--td-space-1);
}
