/* ══════════════════════════════════════════════════════════════════════════════
   ShiftHR — People
   ──────────────────────────────────────────────────────────────────────────────
   People directory: search/filter toolbar, card grid, person cards.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Directory Container ──────────────────────────────────────────────────── */
.people-directory {
    margin-top: var(--space-6);
}

/* ── Filters Toolbar ──────────────────────────────────────────────────────── */
.people-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-4);
}

.people-search {
    flex: 1;
    min-width: 220px;
}

.people-search-input {
    width: 100%;
}

.people-filter-group {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.people-filter-group select {
    min-width: 160px;
}

/* ── Results Summary ──────────────────────────────────────────────────────── */
.people-results-summary {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: .85rem;
    color: var(--color-neutral-500);
    font-weight: 500;
}

/* ── Card Grid ────────────────────────────────────────────────────────────── */
.people-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin-bottom: var(--space-8);
}

/* ── Person Card ──────────────────────────────────────────────────────────── */
/* The card is the kit Card's click mode (a native button, #1040): its surface, hover lift and focus
   ring are the kit's. This row lays out the avatar beside the words. */
.people-card-row {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

/* ── Avatar ───────────────────────────────────────────────────────────────── */
.people-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-brand-light);
    color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
    border: 2px solid var(--color-border-brand);
}

/* ── Info Block ───────────────────────────────────────────────────────────── */
.people-info {
    flex: 1;
    min-width: 0;
}

/* The name and the title and address lines are the kit's card-interior type (#1040). */
.people-departments {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin-top: var(--space-1);
}

/* #795: the group chip is a NAME label: the kit Badge's outline (the status map's label). */

/* CB-3 (a), CB-2 (b): the HR view's start dates and emergency contacts, laid out like the vacancies. */
.people-hr-records {
    margin-top: var(--space-6);
}

/* ── Vacant positions (PIN-1 (a), #1126) ──────────────────────────────────── */
/* A people leader's vacant seats under Show HR information: a heading over the directory's card grid. */
.people-vacancies {
    margin-top: var(--space-6);
}
.people-vacancies-title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}
.people-vacancies-sub {
    margin: var(--space-1) 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
}

/* ── Person page (#1113; Pass H stage 1, #1393) ───────────────────────────── */
/* The page header's avatar beside the h1 (Pass H 2 (a): the kit's Avatar at Xl; the BackLink above it). */
.person-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-3);
}
.person-header h1 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* A section's own act at its Card's foot (C2): the person's own Edit in My Profile. */
.person-card-foot {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* About: one member's work facts and Public fields, a label column beside the values, stacked on a phone. */
.person-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-6);
    margin: 0;
    font-size: var(--text-sm);
}
.person-facts dt {
    font-weight: 600;
    color: var(--color-neutral-700);
}
.person-facts dd {
    margin: 0;
    color: var(--color-neutral-900);
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    .person-facts {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .person-facts dd {
        margin-bottom: var(--space-3);
    }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .people-filters {
        flex-direction: column;
    }
    .people-search {
        width: 100%;
    }
    .people-filter-group {
        width: 100%;
    }
    .people-filter-group select {
        flex: 1;
    }
    .people-grid {
        grid-template-columns: 1fr;
    }
}
