/* Center team — compact cabinet + profile */

.cb-team {
    --cb-team-pad: 14px;
    overflow: hidden;
}

.cb-team .cb-card__head,
.cb-team__head {
    margin-bottom: 0;
    padding: var(--cb-team-pad) var(--cb-team-pad) 0;
}

.cb-team__head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
}

.cb-team__intro {
    flex: 1 1 12rem;
    min-width: 0;
}

.cb-team__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--lg-blue, #0f2d52);
}

.cb-team__title i {
    font-size: 0.92em;
    color: var(--lg-emerald, #059669);
}

.cb-team__head .cb-team__lead,
.cb-team__lead {
    margin: 0;
    max-width: 44ch;
    font-size: 13px;
    line-height: 1.4;
}

.cb-team__invite {
    flex: 0 0 auto;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    min-height: 36px;
    height: auto;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.cb-team__invite:hover {
    transform: translateY(-1px);
}

.cb-team__invite:active {
    transform: translateY(0);
}

.cb-team__invite i {
    font-size: 13px;
}

.cb-team__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px var(--cb-team-pad) var(--cb-team-pad);
}

.cb-team__block {
    margin: 0;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid rgba(15, 45, 82, 0.07);
    animation: cb-team-in 0.28s ease both;
}

.cb-team__block:first-child,
.cb-team__block[hidden] + .cb-team__block {
    border-top: 0;
    padding-top: 4px;
}

.cb-team__block[hidden] {
    display: none !important;
}

.cb-team__block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.cb-team__subtitle {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7c8f;
}

.cb-team__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 45, 82, 0.08);
    color: var(--lg-blue, #0f2d52);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.cb-team__list,
.cb-team__members {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cb-team__empty {
    margin: 0;
    padding: 10px 0 2px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--lg-muted, #6b7c8f);
}

.cb-team-item,
.cb-team-member {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f5f8fb;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    animation: cb-team-in 0.3s ease both;
}

.cb-team-item:hover,
.cb-team-member:hover {
    background: #eef4f9;
    border-color: rgba(15, 45, 82, 0.08);
}

.cb-team-item__avatar,
.cb-team-member__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #e2eaf2;
}

.cb-team-item__main,
.cb-team-member__main {
    flex: 1 1 auto;
    min-width: 0;
}

.cb-team-item__name,
.cb-team-member__name {
    margin: 0;
    font-weight: 650;
    font-size: 0.9rem;
    line-height: 1.25;
    color: var(--lg-blue, #0f2d52);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-team-item__name a,
.cb-team-member__name a {
    color: inherit;
    text-decoration: none;
}

.cb-team-item__name a:hover,
.cb-team-member__name a:hover {
    color: var(--lg-emerald, #059669);
}

.cb-team-item__meta,
.cb-team-member__meta {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7c8f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-team-item__msg {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #4a5d70;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cb-team-item__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-left: auto;
    flex: 0 0 auto;
}

.cb-team-item__actions .lg-btn,
.cb-team-member .lg-btn {
    min-height: 32px;
    height: auto;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.cb-team-invite__lead {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
}

.cb-team-invite__label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--lg-blue, #0f2d52);
}

.cb-team-invite__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(15, 45, 82, 0.16);
    border-radius: 0;
    font: inherit;
    font-size: 0.92rem;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cb-team-invite__input:focus {
    outline: none;
    border-color: var(--lg-emerald, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.cb-team-invite__results {
    margin-top: 10px;
    max-height: min(48vh, 20rem);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cb-team-search-item {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 45, 82, 0.08);
    background: #f5f8fb;
    transition: background-color 0.18s ease, border-color 0.18s ease;
    animation: cb-team-in 0.25s ease both;
}

.cb-team-search-item:hover {
    background: #eef4f9;
    border-color: rgba(5, 150, 105, 0.25);
}

.cb-team-search-item__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.cb-team-search-item__main {
    flex: 1 1 auto;
    min-width: 0;
}

.cb-team-search-item__name {
    margin: 0;
    font-weight: 650;
    font-size: 0.88rem;
    color: var(--lg-blue, #0f2d52);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-team-search-item__meta {
    margin: 2px 0 0;
    font-size: 11px;
    color: #6b7c8f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-team-search-item .lg-btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 650;
    flex: 0 0 auto;
}

.lg-specialists--team {
    margin-top: 0.75rem;
}

.lg-pf-section--team .lg-specialists--team,
.cb-section--team .lg-specialists--team {
    margin-top: 0.55rem;
}

.cb-section--team {
    margin-top: 1rem;
}

.cb-section--team .cb-section__head-row {
    margin-bottom: 0.25rem;
}

.cb-team-overview {
    margin: 0;
    padding: 0;
}

@keyframes cb-team-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 560px) {
    .cb-team__head-row {
        align-items: stretch;
    }

    .cb-team__invite {
        width: 100%;
        justify-content: center;
    }

    .cb-team-item,
    .cb-team-member,
    .cb-team-search-item {
        flex-wrap: wrap;
    }

    .cb-team-item__actions {
        width: 100%;
        margin-left: 0;
        padding-left: 46px;
    }

    .cb-team-item__actions .lg-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .cb-team-member .lg-btn,
    .cb-team-search-item .lg-btn {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-team__invite,
    .cb-team-item,
    .cb-team-member,
    .cb-team-search-item,
    .cb-team__block {
        transition: none;
        animation: none;
    }

    .cb-team__invite:hover {
        transform: none;
    }
}
