/* Searchable person picker (docs/08 §5, R-7) — assets/js/aerobook-person-picker.js */
.aero-person-picker {
    position: relative;
}
.aero-person-picker-results {
    top: 100%;
    right: 0;
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1050;
}

/* Names read left-aligned (0.6.186, Dara 2026-10-09: «the list of names, students and instructor pilots, left-aligned»): they are mostly
   Latin («Capt. Zarei»), which hangs off the right edge of a right-to-left box. The box is laid out left-to-right — the picture/initials
   first, the tick of the chosen one at the far end — while each name still orders its own letters (unicode-bidi: plaintext; the name
   span is also dir="auto"). Physical properties on purpose, like the time field. */
.aero-person-picker-input {
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: left;
    padding-right: 2.6rem;   /* room for the «×» */
}
.aero-person-picker-results {
    direction: ltr;
    text-align: left;
}

/* The «×» inside the box (assets/js/aerobook-person-picker.js, 0.6.186): clears the name entirely so another person can be chosen. */
.aero-person-picker__clear {
    position: absolute;
    top: 50%;
    right: .55rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aero-wash);
    color: var(--aero-ink-muted);
    cursor: pointer;
    transition: background-color var(--aero-transition), color var(--aero-transition);
}
.aero-person-picker__clear[hidden],
.aero-person-picker-input:disabled ~ .aero-person-picker__clear { display: none; }
.aero-person-picker__clear:hover,
.aero-person-picker__clear:focus-visible {
    background: color-mix(in srgb, var(--aero-danger) 14%, var(--aero-surface));
    color: var(--aero-danger);
}
.aero-person-picker__clear:focus-visible { outline: 2px solid var(--aero-danger); outline-offset: 1px; }
.aero-person-picker__clear svg { display: block; pointer-events: none; }

/* One person, the same way everywhere (docs/43 D; Dara's mockup «تخصیص استاد خلبان») — a round picture or the initials, the titled name, the roles as small chips.
   Drawn by templates/components/person-name.php and, for the picker's result rows, by assets/js/aerobook-person-picker.js; made of the design tokens only. */
.aero-person {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    max-width: 100%;
    text-align: start;
}
.aero-person__avatar {
    position: relative;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--aero-brand-100);
    color: var(--aero-brand-700);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.aero-person__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.aero-person__dot {
    position: absolute;
    inset-block-end: -1px;
    inset-inline-end: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--aero-surface);
    background: var(--aero-ink-muted);
}
.aero-person__dot--ok { background: var(--aero-success); }
.aero-person__dot--busy { background: var(--aero-warning); }
.aero-person__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}
.aero-person__name {
    font-weight: 600;
    color: var(--aero-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aero-person__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .15rem;
}
.aero-person__chip {
    font-size: .68rem;
    padding: .05rem .5rem;
    border-radius: 999px;
    background: var(--aero-wash);
    color: var(--aero-ink-muted);
    border: 1px solid var(--aero-line);
    white-space: nowrap;
}
/* the picker's result rows: the person on one side, a tick on the one already chosen */
.aero-person-picker-results .aero-person-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    text-align: start;
}
.aero-person-picker-results .aero-person-row.is-selected::after {
    content: "\2713";
    color: var(--aero-brand-600);
    font-weight: 700;
}

/* The log viewer (docs/43 A, /panel/logs/) */
.aero-logs__msg {
    max-width: 60ch;
    font-size: .85rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.aero-logs__file {
    max-height: 70vh;
    overflow: auto;
    margin: 0;
    padding: .75rem 1rem;
    border-radius: var(--aero-radius-sm);
    background: var(--aero-ink);
    color: var(--aero-bg);
    font-size: .75rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.aero-logs__danger {
    padding: .75rem 1rem;
    border: 1px solid var(--aero-danger);
    border-radius: var(--aero-radius-sm);
}
