/* Recipient picker tree (EmailRecipientPicker / TextRecipientPicker in ASIModule.Comms).
   Global on purpose: module scoped-CSS bundles are delivered through fingerprinted
   imports that break whenever build output and the running app disagree (see
   copilot-instructions "Component CSS in Production"). Same fix as marketing.css. */

.recipient-tree .recipient-client-row > td {
    font-weight: 600;
}

.recipient-client-name,
.recipient-person-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.recipient-client-name > span,
.recipient-person-name > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-client-name > i,
.recipient-person-name > i {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.recipient-count {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 500;
}

.recipient-count i {
    font-size: 0.75rem;
}

.recipient-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.recipient-toggle:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.recipient-toggle i {
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.recipient-toggle.expanded i {
    transform: rotate(90deg);
}

.recipient-toggle-spacer {
    display: inline-block;
    flex-shrink: 0;
    width: 1.5rem;
}

.recipient-tree .recipient-person-row > td {
    font-weight: 400;
}

.recipient-tree .recipient-person-row > td:nth-child(2) {
    color: var(--text-secondary);
}

.recipient-tree .recipient-person-row > td:first-child {
    position: relative;
    padding-left: 3rem;
}

/* Elbow connector tying each person back to its client row */
.recipient-tree .recipient-person-row > td:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1.5rem;
    border-left: 1px solid var(--border-color);
}

.recipient-tree .recipient-person-row-last > td:first-child::before {
    bottom: 50%;
}

.recipient-tree .recipient-person-row > td:first-child::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 1.5rem;
    width: 0.75rem;
    border-top: 1px solid var(--border-color);
}
