/**
 * Team communications bento — dashboard-style thread list + chat + typing indicator.
 * Pattern mirrors the recording bento (two-column mock dash).
 */
body.pl-landing-time .pl-time-voice-wide-stage {
    margin-top: auto;
    flex: 0 0 auto;
    height: 276px;
    min-height: 276px;
    max-height: 276px;
    padding: 12px 10px 0;
    display: flex;
    align-items: stretch;
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body.pl-landing-time .pl-team-comms-anim {
    --team-comms-cycle: 10s;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

/* —— Left: thread list —— */
body.pl-landing-time .pl-team-comms-anim__list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 9px 8px 0;
    border-radius: 12px 12px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(8px);
    animation: plTeamCommsListIn var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
    overflow: hidden;
}

body.pl-landing-time .pl-team-comms-anim__list-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 2px 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}

body.pl-landing-time .pl-team-comms-anim__list-head strong {
    font-size: 10px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
}

body.pl-landing-time .pl-team-comms-anim__rows-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
}

body.pl-landing-time .pl-team-comms-anim__rows {
    list-style: none;
    margin: 0;
    padding: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.pl-landing-time .pl-team-comms-anim__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
}

body.pl-landing-time .pl-team-comms-anim__row.is-unread .pl-team-comms-anim__row-preview {
    color: #111;
    font-weight: 600;
    animation: plTeamCommsUnreadClear var(--team-comms-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__row--new {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    animation:
        plTeamCommsRowIn var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards,
        plTeamCommsRowSelect var(--team-comms-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__av {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    background: var(--pl-team-fill, #6b7280);
    flex-shrink: 0;
}

body.pl-landing-time .pl-team-comms-anim__av--sam { --pl-team-fill: #3373d1; }
body.pl-landing-time .pl-team-comms-anim__av--alex { --pl-team-fill: #0d9488; }
body.pl-landing-time .pl-team-comms-anim__av--jordan { --pl-team-fill: #7c3aed; }
body.pl-landing-time .pl-team-comms-anim__av--cust { --pl-team-fill: #111; }
body.pl-landing-time .pl-team-comms-anim__av--muted {
    background: #e5e7eb;
    color: #6b7280;
}

body.pl-landing-time .pl-team-comms-anim__row-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

body.pl-landing-time .pl-team-comms-anim__row-title {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

body.pl-landing-time .pl-team-comms-anim__row-title strong {
    font-size: 10px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.pl-landing-time .pl-team-comms-anim__badge {
    flex-shrink: 0;
    padding: 1px 4px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

body.pl-landing-time .pl-team-comms-anim__row-preview {
    font-size: 8px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: normal;
}

body.pl-landing-time .pl-team-comms-anim__row-time {
    font-size: 8px;
    font-weight: 600;
    color: #9ca3af;
    align-self: start;
    padding-top: 1px;
}

body.pl-landing-time .pl-team-comms-anim__dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #007aff;
    border: 1.5px solid #fff;
    opacity: 0;
}

body.pl-landing-time .pl-team-comms-anim__row--new .pl-team-comms-anim__dot {
    animation: plTeamCommsDotIn var(--team-comms-cycle) ease-out 1 forwards;
}

/* —— Right: open thread —— */
body.pl-landing-time .pl-team-comms-anim__thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 9px 10px 10px;
    border-radius: 12px 12px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(8px);
    animation: plTeamCommsThreadIn var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
    overflow: hidden;
}

body.pl-landing-time .pl-team-comms-anim__thread-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}

body.pl-landing-time .pl-team-comms-anim__thread-head-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

body.pl-landing-time .pl-team-comms-anim__thread-head-copy strong {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
}

body.pl-landing-time .pl-team-comms-anim__thread-head-copy em {
    font-style: normal;
    font-size: 8px;
    font-weight: 600;
    color: #9ca3af;
}

/* Prevent iOS Safari “I can call” blue link on demo phone numbers */
body.pl-landing-time .pl-team-comms-anim a[x-apple-data-detectors],
body.pl-landing-time .pl-team-comms-anim a[href^="tel:"] {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: inherit !important;
    font-style: inherit !important;
    pointer-events: none;
}

body.pl-landing-time .pl-team-comms-anim__msgs {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    overflow: hidden;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    max-width: 92%;
    margin-bottom: 6px;
    opacity: 0;
    transform: translateY(6px);
}

body.pl-landing-time .pl-team-comms-anim__bubble-row.is-out {
    align-self: flex-end;
    flex-direction: row;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row.is-in {
    align-self: flex-start;
}

body.pl-landing-time .pl-team-comms-anim__actor-av {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    background: var(--pl-team-fill, #6b7280);
    line-height: 1;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row--1 {
    animation: plTeamCommsBubbleIn var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
    animation-delay: 0s;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row--2 {
    animation: plTeamCommsBubbleIn2 var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row--3 {
    animation: plTeamCommsBubbleIn3 var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row--4 {
    animation: plTeamCommsBubbleIn4 var(--team-comms-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__tail {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    animation: plTeamCommsTailSlot var(--team-comms-cycle) ease-in-out 1 forwards;
}

/* Typing overlays the same slot Alex’s reply will use — no extra gap */
body.pl-landing-time .pl-team-comms-anim__typing {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    font-size: 9px;
    line-height: 1.3;
    color: #6b7280;
    opacity: 0;
    pointer-events: none;
    animation: plTeamCommsTyping var(--team-comms-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-team-comms-anim__typing .pl-team-comms-anim__actor-av {
    width: 18px;
    height: 18px;
    font-size: 7px;
}

body.pl-landing-time .pl-team-comms-anim__typing-label {
    min-width: 0;
    font-weight: 500;
}

body.pl-landing-time .pl-team-comms-anim__bubble {
    padding: 7px 10px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    background: #eef2ff;
    color: #1e1e1e;
    min-width: 0;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row.is-in .pl-team-comms-anim__bubble {
    background: #f3f4f6;
    color: #111;
    border-bottom-left-radius: 4px;
}

body.pl-landing-time .pl-team-comms-anim__bubble--form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
    padding: 8px 9px;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border-bottom-left-radius: 4px;
}

body.pl-landing-time .pl-team-comms-anim__form-kicker {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
}

body.pl-landing-time .pl-team-comms-anim__field {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

body.pl-landing-time .pl-team-comms-anim__field span {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

body.pl-landing-time .pl-team-comms-anim__field strong {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111;
    line-height: 1.35;
}

body.pl-landing-time .pl-team-comms-anim__bubble-row.is-out .pl-team-comms-anim__bubble {
    background: #007aff;
    color: #fff;
    border-bottom-right-radius: 4px;
}

body.pl-landing-time .pl-team-comms-anim__tail .pl-team-comms-anim__bubble-row--4 {
    align-self: flex-end;
    margin-bottom: 0;
}

@keyframes plTeamCommsListIn {
    0%, 4% { opacity: 0; transform: translateY(8px); }
    12%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plTeamCommsThreadIn {
    0%, 18% { opacity: 0; transform: translateY(8px); }
    24%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plTeamCommsRowIn {
    0%, 10% {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: translateY(-4px);
    }
    16%, 100% {
        max-height: 48px;
        opacity: 1;
        padding-top: 5px;
        padding-bottom: 5px;
        transform: translateY(0);
    }
}

@keyframes plTeamCommsRowSelect {
    0%, 16% {
        background: transparent;
        border-color: transparent;
    }
    20%, 100% {
        background: #f3f4f6;
        border-color: rgba(0, 0, 0, 0.04);
    }
}

@keyframes plTeamCommsDotIn {
    0%, 12% { opacity: 0; }
    15%, 18% { opacity: 1; }
    22%, 100% { opacity: 0; }
}

@keyframes plTeamCommsUnreadClear {
    0%, 18% {
        color: #111;
        font-weight: 600;
    }
    22%, 100% {
        color: #9ca3af;
        font-weight: 500;
    }
}

@keyframes plTeamCommsBubbleIn {
    0%, 26% { opacity: 0; transform: translateY(6px); }
    32%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plTeamCommsBubbleIn2 {
    0%, 34% { opacity: 0; transform: translateY(6px); }
    40%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plTeamCommsBubbleIn3 {
    0%, 42% { opacity: 0; transform: translateY(6px); }
    48%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plTeamCommsBubbleIn4 {
    0%, 66% {
        opacity: 0;
        transform: translateY(6px);
        max-height: 0;
        overflow: hidden;
    }
    74%, 100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 64px;
        overflow: visible;
    }
}

@keyframes plTeamCommsTyping {
    0%, 52% { opacity: 0; }
    56%, 64% { opacity: 1; }
    70%, 100% { opacity: 0; }
}

@keyframes plTeamCommsTailSlot {
    0%, 52% { min-height: 0; }
    56%, 68% { min-height: 28px; }
    74%, 100% { min-height: 0; }
}

@media (max-width: 720px) {
    body.pl-landing-time .pl-team-comms-anim {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 6px;
    }

    body.pl-landing-time .pl-team-comms-anim__list,
    body.pl-landing-time .pl-team-comms-anim__thread {
        padding-left: 7px;
        padding-right: 7px;
    }

    body.pl-landing-time .pl-team-comms-anim__row {
        gap: 5px;
        padding: 4px 5px;
        border-radius: 7px;
    }

    body.pl-landing-time .pl-team-comms-anim__av {
        width: 20px;
        height: 20px;
        font-size: 7px;
    }

    body.pl-landing-time .pl-team-comms-anim__row-title strong {
        font-size: 9px;
    }

    body.pl-landing-time .pl-team-comms-anim__row-preview,
    body.pl-landing-time .pl-team-comms-anim__row-time {
        font-size: 7px;
    }

    body.pl-landing-time .pl-team-comms-anim__dot {
        width: 6px;
        height: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-landing-time .pl-team-comms-anim__list,
    body.pl-landing-time .pl-team-comms-anim__thread,
    body.pl-landing-time .pl-team-comms-anim__row--new,
    body.pl-landing-time .pl-team-comms-anim__row--new .pl-team-comms-anim__dot,
    body.pl-landing-time .pl-team-comms-anim__row.is-unread .pl-team-comms-anim__row-preview,
    body.pl-landing-time .pl-team-comms-anim__bubble-row,
    body.pl-landing-time .pl-team-comms-anim__typing,
    body.pl-landing-time .pl-team-comms-anim__tail {
        animation: none !important;
    }

    body.pl-landing-time .pl-team-comms-anim__list,
    body.pl-landing-time .pl-team-comms-anim__thread,
    body.pl-landing-time .pl-team-comms-anim__bubble-row {
        opacity: 1;
        transform: none;
    }

    body.pl-landing-time .pl-team-comms-anim__row--new {
        max-height: none;
        opacity: 1;
        padding-top: 5px;
        padding-bottom: 5px;
        background: #f3f4f6;
        border-color: rgba(0, 0, 0, 0.04);
    }

    body.pl-landing-time .pl-team-comms-anim__row.is-unread .pl-team-comms-anim__row-preview {
        color: #9ca3af;
        font-weight: 500;
    }

    body.pl-landing-time .pl-team-comms-anim__typing {
        opacity: 1;
    }
}
