/* Live voice calls: the agent's strip (AgentCallBar, every admin page) and the visitor's floating bar (VisitorCallBar). */

.voice-bar {
    align-items: center;
    background: #1f2933;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    gap: 0.6rem;
    max-width: calc(100vw - 1.5rem);
    padding: 0.6rem 0.85rem;
}

.voice-bar.is-active {
    background: #14532d;
}

.voice-bar-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.voice-bar-text {
    align-items: center;
    display: inline-flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.voice-bar-detail {
    flex-basis: 100%;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.72rem;
    opacity: 0.8;
}

.voice-bar-time {
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

.voice-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 0;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0.35rem 0.85rem;
}

.voice-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.voice-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.voice-btn[aria-pressed="true"] {
    background: #fff;
    color: #1f2933;
}

.voice-btn-end {
    background: #d93025;
}

.voice-btn-end:hover {
    background: #b3261e;
}

.voice-btn-accept {
    background: #1f9d55;
}

.voice-btn-accept:hover {
    background: #17803f;
}

/* Agent: pinned to the bottom centre of the admin shell. */
.voice-bar-admin {
    inset-block-end: 1rem;
    inset-inline-start: 50%;
    position: fixed;
    transform: translateX(-50%);
    z-index: 1200;
}

html[dir="rtl"] .voice-bar-admin {
    transform: translateX(50%);
}

/* Visitor: above the chat launcher, on the same side. */
.voice-bar-site {
    inset-block-end: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 1.25rem;
    position: fixed;
    z-index: 1060;
}

.voice-bar-site.is-incoming {
    animation: voice-ring 1s ease-in-out infinite;
    background: #0b5cad;
}

@keyframes voice-ring {
    50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    .voice-bar-site.is-incoming { animation: none; }
}

@media (max-width: 575.98px) {
    .voice-bar-site {
        inset-inline: 0.75rem;
    }
}
