/* player-search: the back office's one "find a person" box (components/
   playerSearch.js). The search box and the chosen row occupy the same slot,
   so a card never changes height when someone is picked; results float. */
.player-search {
    position: relative;
}

.player-search .p-inputtext {
    width: 100%;
}

.player-search-results {
    position: absolute;
    z-index: 2;
    top: calc(100% - 2px);
    right: 0;
    left: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-2);
}

.player-search-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.player-search-result:last-child {
    border-bottom: 0;
}

.player-search-result:hover,
.player-search-result:focus-visible {
    background: var(--color-surface-hover);
}

.player-search-result:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.player-search-result-name {
    font-size: var(--text-base);
    font-weight: 500;
}

/* The phone reads as a label, not a faint aside — darker, so it anchors
   the row against the name. */
.player-search-result-meta {
    flex: 0 0 auto;
    font-size: var(--text-sm);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
}

.player-search-chosen {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.player-search-chosen-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-search-chosen-meta {
    flex: 0 0 auto;
    font-size: var(--text-sm);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
}

.player-search-chosen-clear {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-tertiary);
    font-size: 11px;
    cursor: pointer;
}

.player-search-chosen-clear:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}
