/**
 * Pathline Agents SMS handoff bento animation.
 * Scoped to body.pl-landing-time only.
 */
/* Pathline Agents — AI first contact → handoff */
body.pl-landing-time .pl-time-agent-stage {
    margin-top: auto;
    flex: 0 0 auto;
    height: 276px;
    min-height: 276px;
    max-height: 276px;
    padding: 14px 14px 0;
    display: flex;
    align-items: stretch;
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body.pl-landing-time .pl-agent-anim {
    --agent-cycle: 8s;
    display: grid;
    grid-template-columns: minmax(132px, 0.38fr) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

body.pl-landing-time .pl-agent-anim__intent {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 16px 14px;
    border-radius: 14px 14px 0 0;
    background: #111;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
    animation: plAgentIntent var(--agent-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__intent-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.pl-landing-time .pl-agent-anim__intent-copy strong {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

body.pl-landing-time .pl-agent-anim__intent-copy span {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.68);
}

body.pl-landing-time .pl-agent-anim__thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 0;
    border-radius: 14px 14px 0 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

body.pl-landing-time .pl-agent-anim__bubble {
    max-width: 92%;
    padding: 9px 11px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

body.pl-landing-time .pl-agent-anim__bubble--in {
    align-self: flex-start;
    background: #f2f2f7;
    color: #111;
    border-bottom-left-radius: 4px;
    animation: plAgentIn var(--agent-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

body.pl-landing-time .pl-agent-anim__tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #155eef;
    opacity: 0;
    animation: plAgentAiTag var(--agent-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__tag--human {
    color: #111;
    animation-name: plAgentHumanTag;
}

body.pl-landing-time .pl-agent-anim__bubble--ai {
    background: rgba(21, 94, 239, 0.1);
    color: #0f274f;
    border-bottom-right-radius: 4px;
    animation: plAgentAi var(--agent-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__bubble--out {
    background: #155eef;
    color: #fff;
    border-bottom-right-radius: 4px;
    animation: plAgentOut var(--agent-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__handoff {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.96);
    animation: plAgentHandoff var(--agent-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-agent-anim__handoff-line {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

body.pl-landing-time .pl-agent-anim__handoff-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

body.pl-landing-time .pl-agent-anim__handoff-pill img {
    width: 14px !important;
    height: 14px !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 3px;
    object-fit: cover !important;
}

@keyframes plAgentIntent {
    0%, 8% { opacity: 0.55; transform: translateY(4px); }
    14%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plAgentIn {
    0%, 12% { opacity: 0; transform: translateY(8px) scale(0.98); }
    18%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes plAgentAiTag {
    0%, 28% { opacity: 0; }
    34%, 100% { opacity: 1; }
}

@keyframes plAgentAi {
    0%, 28% { opacity: 0; transform: translateY(8px) scale(0.98); }
    34%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes plAgentHandoff {
    0%, 48% { opacity: 0; transform: scale(0.96); }
    54%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes plAgentHumanTag {
    0%, 58% { opacity: 0; }
    64%, 100% { opacity: 1; }
}

@keyframes plAgentOut {
    0%, 58% { opacity: 0; transform: translateY(8px) scale(0.98); }
    64%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
    body.pl-landing-time .pl-agent-anim {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    body.pl-landing-time .pl-agent-anim__intent {
        flex-direction: row;
        align-items: center;
        padding: 12px 14px;
    }

    /* Extra stage height so stacked mobile content (incl. handoff) isn’t clipped */
    body.pl-landing-time .pl-time-agent-stage {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-landing-time .pl-agent-anim__intent,
    body.pl-landing-time .pl-agent-anim__bubble,
    body.pl-landing-time .pl-agent-anim__tag,
    body.pl-landing-time .pl-agent-anim__handoff {
        animation: none !important;
    }

    body.pl-landing-time .pl-agent-anim__bubble,
    body.pl-landing-time .pl-agent-anim__tag,
    body.pl-landing-time .pl-agent-anim__handoff {
        opacity: 1;
        transform: none;
    }
}
