/* Call: a tile per person, the controls under them. */
.call-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: var(--sp-3);
}
.call-tile {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: var(--surface-2, #111827);
    border: 1px solid var(--border);
}
.call-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.call-tile.is-screen video { object-fit: contain; background: #000; }
.call-tile.is-empty video { visibility: hidden; }
/* Camera off: the person's initial in a circle, as a call app shows them. */
.call-tile.is-empty::before {
    content: attr(data-initial);
    position: absolute; left: 50%; top: 45%;
    width: 72px; height: 72px;
    transform: translate(-50%, -50%);
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--surface-3, #1e2a3d);
    color: var(--text);
    font-size: 30px; font-weight: 700;
}
.call-tile.is-empty::after {
    content: 'Camera off';
    position: absolute; left: 0; right: 0; top: calc(45% + 48px);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.call-tile figcaption {
    position: absolute; left: var(--sp-2); bottom: var(--sp-2);
    max-width: calc(100% - var(--sp-4));
    padding: 2px var(--sp-2);
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: var(--fs-sm);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The connection to this person dropped; the SDK is bringing it back. */
.call-tile.is-reconnecting video { opacity: .45; }
.call-tile.is-reconnecting figcaption { background: var(--warning, #fbbf24); color: #1c1400; }
.call-controls { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.call-controls [aria-pressed="true"] { outline: 2px solid var(--accent-ink); }

/* Speaking: a ring that follows the voice, measured from the sound itself. */
.call-tile { transition: box-shadow 120ms ease, border-color 120ms ease; }
.call-tile.is-speaking { border-color: var(--success, #34d399); box-shadow: 0 0 0 3px var(--success, #34d399); }

/* Reactions: four buttons, and what they send floats up over the sender's tile. */
.call-reactions { display: inline-flex; gap: var(--sp-1); margin-left: auto; }
.call-reactions .btn { min-width: 40px; padding-inline: var(--sp-2); font-size: 18px; }
.call-react {
    position: absolute;
    bottom: 18%;
    font-size: 36px;
    pointer-events: none;
    animation: call-float 2.4s ease-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}
@keyframes call-float {
    0% { transform: translateY(0) scale(.6); opacity: 0; }
    15% { transform: translateY(-10px) scale(1.1); opacity: 1; }
    100% { transform: translateY(-140px) scale(1); opacity: 0; }
}
@media (max-width: 560px) { .call-reactions { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) {
    .call-react { animation: none; opacity: 1; top: var(--sp-2); bottom: auto; }
    .call-tile { transition: none; }
}
