/**
 * Call Management & UX — component styles.
 *
 * Loaded alongside the VRS Jitsi Meet frontend.
 */

/* ============================================
   CALL WAITING OVERLAY
   ============================================ */

.call-waiting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: call-waiting-fade-in 0.3s ease;
}

/* A ring from someone with a photo fills the screen with it; the scrim and
   the glass card keep the name and the buttons readable. */
.call-waiting-overlay.has-photo {
    align-items: flex-end;
    background: #05080d;
    isolation: isolate;
    padding-bottom: 8vh;
}

.call-waiting-photo {
    inset: 0;
    position: absolute;
    z-index: -1;
}

.call-waiting-photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.call-waiting-photo::after {
    background: linear-gradient(to bottom, rgba(5, 8, 13, 0.5) 0%, rgba(5, 8, 13, 0.1) 40%, rgba(5, 8, 13, 0.8) 100%);
    content: '';
    inset: 0;
    position: absolute;
}

.call-waiting-overlay.has-photo .call-waiting-card {
    backdrop-filter: blur(12px);
    background: rgba(10, 16, 28, 0.55);
}

@keyframes call-waiting-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.call-waiting-card {
    background: #17192C;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: call-waiting-pulse 2s ease-in-out infinite;
}

@keyframes call-waiting-pulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); }
    50%      { box-shadow: 0 8px 48px rgba(244, 125, 34, 0.3); }
}

.call-waiting-card h3 {
    color: #fff;
    font-size: 1.25rem;
    margin: 12px 0 4px;
}

.call-waiting-caller {
    color: #F4F4F7;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 4px 0;
}

.call-waiting-status {
    color: #A6A9BA;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.call-waiting-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.call-waiting-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    transition: transform 0.15s, box-shadow 0.15s;
}

.call-waiting-btn:hover {
    transform: scale(1.05);
}

.call-waiting-btn i {
    font-size: 1.5rem;
}

.call-waiting-btn.accept {
    background: #2FA35A;
}

.call-waiting-btn.reject {
    background: #D23B3B;
}

.call-waiting-btn.hold {
    background: #F47D22;
    color: #0D1A38;
}

/* The call this person put on hold (HeldCallBar.web.tsx): small, at the top. */
.held-call-bar {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 370;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: 18px;
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.9rem;
}

.held-call-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.held-call-bar-btn {
    min-height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 14px;
    background: #3a3a3a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.held-call-bar-btn.end {
    background: #D23B3B;
}

.held-call-bar-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* The reply list of the held-call bar (Reply, HeldCallBar.web): one reply in each row. */
.held-call-bar-replies {
    flex-direction: column;
    align-items: stretch;
    width: min(420px, calc(100% - 24px));
}

.held-call-bar-reply {
    min-height: 44px;
    padding: 8px 12px;
    text-align: left;
    white-space: normal;
}

/* The interpreter's hold timer and 5-minute check (InterpreterHoldBar.web). */
.interpreter-hold-bar {
    flex-wrap: wrap;
    justify-content: center;
}

.interpreter-hold-bar .held-call-bar-label {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.interpreter-hold-check {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   IN-CALL CHAT PANEL
   ============================================ */

.chat-toggle-btn {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    flex: 0 0 auto;
    align-self: flex-start;
    border-radius: 50%;
    background: #1e40af;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.2s;
}

.chat-toggle-btn.active {
    background: #E5701A;
    color: #0D1A38;
}

.chat-toggle-btn:hover {
    background: #F47D22;
    color: #0D1A38;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #D23B3B;
    color: #fff;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.in-call-chat-panel {
    position: fixed;
    right: 16px;
    bottom: 140px;
    width: 340px;
    height: 440px;
    background: #212439;
    border: 1px solid #272A41;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 5001;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    animation: chat-slide-in 0.2s ease;
}

.in-call-chat-panel-persistent {
    animation: none;
    border-color: rgba(106, 169, 255, 0.28);
    bottom: auto;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    height: 100%;
    max-height: none;
    min-height: 0;
    position: static;
    right: auto;
    width: 100%;
    z-index: auto;
}

.in-call-chat-panel-persistent .chat-header {
    min-height: 48px;
}

@keyframes chat-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #272A41;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #A6A9BA;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-empty {
    color: #64748b;
    text-align: center;
    padding: 40px 16px;
    font-size: 0.85rem;
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.chat-message.self {
    align-self: flex-end;
    background: #1e40af;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.other {
    align-self: flex-start;
    background: #1e293b;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #272A41;
}

.chat-input-area textarea {
    flex: 1;
    background: #1a2744;
    border: 1px solid #2d4a6f;
    border-radius: 8px;
    color: #e2e8f0;
    padding: 8px 12px;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #F47D22;
}

.chat-send-btn {
    background: #F47D22;
    color: #0D1A38;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn:not(:disabled):hover {
    background: #E5701A;
}

/* ============================================
   DND TOGGLE
   ============================================ */

.dnd-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.dnd-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: transparent;
    color: #A6A9BA;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.dnd-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.dnd-btn:hover {
    border-color: #7c3aed;
}

.dnd-settings-btn {
    background: none;
    border: none;
    color: #A6A9BA;
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
}

.dnd-settings-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1a2744;
    border: 1px solid #2d4a6f;
    border-radius: 8px;
    padding: 12px;
    min-width: 240px;
    z-index: 6000;
}

.dnd-settings-popup label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #A6A9BA;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.dnd-settings-popup textarea {
    background: #212439;
    border: 1px solid #2d4a6f;
    border-radius: 6px;
    color: #e2e8f0;
    padding: 8px;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
}

.dnd-settings-popup button {
    background: #F47D22;
    color: #0D1A38;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */

.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: transparent;
    color: #A6A9BA;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.dark-mode-toggle:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

/* ============================================
   CONFERENCE ADD DIALOG
   ============================================ */

.conference-add-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.conference-add-card {
    background: #212439;
    border: 1px solid #272A41;
    border-radius: 12px;
    padding: 24px;
    min-width: 380px;
    max-width: 440px;
}

.conference-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.conference-add-header h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #A6A9BA;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
}

.conference-add-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conference-add-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #A6A9BA;
    font-size: 0.8rem;
}

.conference-add-form input {
    background: #1a2744;
    border: 1px solid #2d4a6f;
    border-radius: 8px;
    color: #e2e8f0;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.conference-add-form input:focus {
    outline: none;
    border-color: #F47D22;
}

.conference-add-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.cancel-btn {
    background: transparent;
    border: 1px solid #475569;
    color: #A6A9BA;
    border-radius: 8px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.85rem;
}

.add-btn {
    background: #F47D22;
    color: #0D1A38;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.conference-add-description {
    color: #A6A9BA;
    font-size: 0.85rem;
    margin: 0 0 16px;
}

/* ============================================
   DARK MODE THEME OVERRIDES
   ============================================ */

body.vrs-dark {
    --vrs-bg-primary: #0A0A1A;
    --vrs-bg-secondary: #16182B;
    --vrs-bg-card: #17192C;
    --vrs-text-primary: #f1f5f9;
    --vrs-text-secondary: #A6A9BA;
    --vrs-border-color: #272A41;
    --vrs-accent: #F47D22;
    --vrs-input-bg: #212439;
    --vrs-toggle-bg: #272A41;
    --vrs-overlay-bg: rgba(10, 10, 26, 0.98);

    background-color: var(--vrs-bg-primary);
    color: var(--vrs-text-primary);
}

/* Only the call bar itself has a surface: the pill of keys (.toolbox-content-items,
   base/ui/constants.web.ts), as in the apps. The two layers under it, .new-toolbox and
   .toolbox-content, are the full width of the stage and stay clear. A surface on either
   one drew a band over the bottom of the video and cut the self-view tile (Robert,
   2026-11-13 and 2026-11-16, web screenshots of a MalkaVRS P2P call). */
body.vrs-dark .new-toolbox,
body.vrs-dark .toolbox-content {
    background: transparent;
    border-color: transparent;
}

body.vrs-dark .filmstrip {
    background: var(--vrs-bg-secondary);
}

/* Profile overlay panel */
body.vrs-dark .vrs-profile-overlay,
body.vrs-dark [class*="profileOverlay"] {
    background-color: var(--vrs-overlay-bg);
    border-left-color: var(--vrs-border-color);
}

/* Profile sections / cards */
body.vrs-dark [class*="profileOverlay"] section,
body.vrs-dark [class*="profileOverlay"] [class*="section"] {
    background-color: var(--vrs-bg-card);
    border-color: var(--vrs-border-color);
}

/* Inputs in profile / settings */
body.vrs-dark [class*="profileOverlay"] input,
body.vrs-dark [class*="profileOverlay"] select,
body.vrs-dark [class*="profileOverlay"] textarea {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-dark [class*="profileOverlay"] input:focus,
body.vrs-dark [class*="profileOverlay"] select:focus,
body.vrs-dark [class*="profileOverlay"] textarea:focus {
    border-color: var(--vrs-accent);
}

/* Toggle switches in profile */
body.vrs-dark [class*="profileOverlay"] [role="switch"] {
    background-color: var(--vrs-toggle-bg);
}

body.vrs-dark [class*="profileOverlay"] [role="switch"][aria-checked="true"] {
    background-color: var(--vrs-accent);
}

/* Contact drawer overrides */
body.vrs-dark .contacts-drawer,
body.vrs-dark [class*="contactsDrawer"] {
    background-color: var(--vrs-overlay-bg);
    border-left-color: var(--vrs-border-color);
}

body.vrs-dark .contacts-drawer input,
body.vrs-dark .contacts-drawer select,
body.vrs-dark .contacts-drawer textarea,
body.vrs-dark [class*="contactsDrawer"] input,
body.vrs-dark [class*="contactsDrawer"] select,
body.vrs-dark [class*="contactsDrawer"] textarea {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-dark .contacts-drawer input:focus,
body.vrs-dark .contacts-drawer select:focus,
body.vrs-dark [class*="contactsDrawer"] input:focus,
body.vrs-dark [class*="contactsDrawer"] select:focus {
    border-color: var(--vrs-accent);
}

body.vrs-dark .contacts-drawer button,
body.vrs-dark [class*="contactsDrawer"] button {
    color: var(--vrs-text-primary);
}

/* Conference dialog — dark already dark, just ensure consistency */
body.vrs-dark .conference-add-card {
    background: var(--vrs-bg-card);
    border-color: var(--vrs-border-color);
}

body.vrs-dark .conference-add-form input {
    background: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

/* Chat panel overrides */
body.vrs-dark [class*="inCallChat"],
body.vrs-dark [class*="InCallChat"] {
    background-color: var(--vrs-bg-card);
    border-color: var(--vrs-border-color);
}

body.vrs-dark [class*="inCallChat"] input,
body.vrs-dark [class*="InCallChat"] input {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

/* Call waiting card — already dark themed, ensure it uses vars */
body.vrs-dark .call-waiting-card {
    background: var(--vrs-bg-card);
}

/* Dark mode toggle in settings row */
body.vrs-dark [class*="toggleRow"] .dark-mode-toggle {
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-secondary);
}

body.vrs-dark [class*="toggleRow"] .dark-mode-toggle:hover {
    border-color: var(--vrs-accent);
    color: var(--vrs-accent);
}

/* ---- LIGHT MODE THEME ---- */

body.vrs-light {
    --vrs-bg-primary: #ffffff;
    --vrs-bg-secondary: #f8fafc;
    --vrs-bg-card: #ffffff;
    --vrs-text-primary: #0f172a;
    --vrs-text-secondary: #475569;
    --vrs-border-color: #e2e8f0;
    --vrs-accent: #A84A00;
    --vrs-input-bg: #f1f5f9;
    --vrs-toggle-bg: #cbd5e1;
    --vrs-overlay-bg: rgba(255, 255, 255, 0.98);

    background-color: var(--vrs-bg-primary);
    color: var(--vrs-text-primary);
}

/* The call bar's only surface is its pill of keys, as in dark mode above. */
body.vrs-light .new-toolbox,
body.vrs-light .toolbox-content {
    background: transparent;
    border-color: transparent;
}

body.vrs-light .filmstrip {
    background: var(--vrs-bg-secondary);
}

/* Profile overlay — light */
body.vrs-light .vrs-profile-overlay,
body.vrs-light [class*="profileOverlay"] {
    background-color: var(--vrs-overlay-bg);
    border-left-color: var(--vrs-border-color);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
}

body.vrs-light [class*="profileOverlay"] h2,
body.vrs-light [class*="profileOverlay"] [class*="title"] {
    color: var(--vrs-text-primary);
}

body.vrs-light [class*="profileOverlay"] [class*="sectionTitle"],
body.vrs-light [class*="profileOverlay"] [class*="label"] {
    color: var(--vrs-text-secondary);
}

body.vrs-light [class*="profileOverlay"] [class*="section"] {
    background-color: var(--vrs-bg-secondary);
    border-color: var(--vrs-border-color);
}

body.vrs-light [class*="profileOverlay"] input,
body.vrs-light [class*="profileOverlay"] select,
body.vrs-light [class*="profileOverlay"] textarea {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-light [class*="profileOverlay"] input:focus,
body.vrs-light [class*="profileOverlay"] select:focus,
body.vrs-light [class*="profileOverlay"] textarea:focus {
    border-color: var(--vrs-accent);
}

body.vrs-light [class*="profileOverlay"] [role="switch"] {
    background-color: var(--vrs-toggle-bg);
}

body.vrs-light [class*="profileOverlay"] [role="switch"][aria-checked="true"] {
    background-color: var(--vrs-accent);
}

body.vrs-light [class*="profileOverlay"] [class*="closeBtn"] {
    color: var(--vrs-text-secondary);
}

body.vrs-light [class*="profileOverlay"] [class*="closeBtn"]:hover {
    background-color: var(--vrs-bg-secondary);
}

body.vrs-light [class*="profileOverlay"] [class*="saveBtn"],
body.vrs-light [class*="profileOverlay"] [class*="submitBtn"] {
    background-color: var(--vrs-accent);
    color: #fff;
}

body.vrs-light [class*="profileOverlay"] [class*="statusBadge"] {
    background-color: var(--vrs-bg-secondary);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-secondary);
}

body.vrs-light [class*="profileOverlay"] [class*="toggleLabel"] {
    color: var(--vrs-text-primary);
}

body.vrs-light [class*="profileOverlay"] [class*="toggleDesc"] {
    color: var(--vrs-text-secondary);
}

/* Contact drawer — light */
body.vrs-light .contacts-drawer,
body.vrs-light [class*="contactsDrawer"] {
    background-color: var(--vrs-overlay-bg);
    border-left-color: var(--vrs-border-color);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
}

body.vrs-light .contacts-drawer input,
body.vrs-light .contacts-drawer select,
body.vrs-light .contacts-drawer textarea,
body.vrs-light [class*="contactsDrawer"] input,
body.vrs-light [class*="contactsDrawer"] select,
body.vrs-light [class*="contactsDrawer"] textarea {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-light .contacts-drawer input:focus,
body.vrs-light .contacts-drawer select:focus,
body.vrs-light [class*="contactsDrawer"] input:focus,
body.vrs-light [class*="contactsDrawer"] select:focus {
    border-color: var(--vrs-accent);
}

/* Conference dialog — light */
body.vrs-light .conference-add-card {
    background: var(--vrs-bg-card);
    border-color: var(--vrs-border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.vrs-light .conference-add-header h3 {
    color: var(--vrs-text-primary);
}

body.vrs-light .conference-add-form input {
    background: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-light .conference-add-form label {
    color: var(--vrs-text-secondary);
}

body.vrs-light .cancel-btn {
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-secondary);
}

body.vrs-light .add-btn {
    background: var(--vrs-accent);
}

body.vrs-light .conference-add-description {
    color: var(--vrs-text-secondary);
}

/* Call waiting card — light */
body.vrs-light .call-waiting-overlay {
    background: rgba(0, 0, 0, 0.3);
}

body.vrs-light .call-waiting-card {
    background: var(--vrs-bg-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.vrs-light .call-waiting-card h3 {
    color: var(--vrs-text-primary);
}

body.vrs-light .call-waiting-caller {
    color: var(--vrs-accent);
}

body.vrs-light .call-waiting-status {
    color: var(--vrs-text-secondary);
}

/* Chat panel — light */
body.vrs-light [class*="inCallChat"],
body.vrs-light [class*="InCallChat"] {
    background-color: var(--vrs-bg-card);
    border-color: var(--vrs-border-color);
}

body.vrs-light [class*="inCallChat"] input,
body.vrs-light [class*="InCallChat"] input {
    background-color: var(--vrs-input-bg);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

/* Dark mode toggle — light */
body.vrs-light .dark-mode-toggle {
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-secondary);
}

body.vrs-light .dark-mode-toggle:hover {
    border-color: var(--vrs-accent);
    color: var(--vrs-accent);
}

/* Profile button in VRSLayout — light */
body.vrs-light [class*="profileBtn"] {
    background-color: var(--vrs-bg-secondary);
    border-color: var(--vrs-border-color);
    color: var(--vrs-text-primary);
}

body.vrs-light [class*="profileBtn"]:hover {
    background-color: var(--vrs-input-bg);
}

/* ============================================
   GROUP JOIN REQUEST (the host's banner)
   ============================================ */

/* Someone asks to join the group call again without an active ring
   (vrs-server/ws/group-join-approval.js): the host accepts or declines. */
.group-join-banner {
    align-items: center;
    background: rgba(17, 24, 39, 0.94);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    left: 50%;
    max-width: min(620px, calc(100vw - 24px));
    padding: 12px 16px;
    position: fixed;
    top: 18px;
    transform: translateX(-50%);
    z-index: 9990;
}

.group-join-banner-label {
    font-size: 16px;
}

.group-join-banner-btn {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 9px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    min-height: 44px;
    padding: 0 16px;
    background: transparent;
}

.group-join-banner-btn.accept {
    background: #1a7f37;
    border-color: #1a7f37;
}

.group-join-banner-btn:disabled {
    cursor: default;
    opacity: 0.5;
}


/* ============================================
   CLIENT CALL ROOM: desktop and web redesign, page 16 (approved by
   Robert on 2026-11-19), as the iPad call since page 16c (Robert,
   2026-11-20: "Build A", "defaults OK").

   From a 760 px window, VRSLayout marks its root data-room-look="client"
   and the Toolbox marks its band .malka-client-band, for everyone but the
   interpreter (vrs-layout/clientRoomLook.ts). The stage is dark in both
   modes. A 56 px top band and an 88 px bar band, and the picture from edge
   to edge between them. The bars and the chat take their own space: no
   control, bar or panel covers a picture. The bands hide after 3 seconds
   with no mouse move or on a click on the picture (useRoomControls.web.ts
   marks <html data-room-controls="hidden">). The interpreter's room and a
   narrow window keep the rules above.
   ============================================ */

/* The bar band: 88 px under the video, with the iPad bar in its centre. */
#new-toolbox.malka-client-band {
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s linear 0s;
}

#new-toolbox.malka-client-band .toolbox-content {
    align-items: center;
    height: 88px;
    margin-bottom: 0;
}

#new-toolbox.malka-client-band .toolbox-content-wrapper {
    margin: 0 auto;
}

/* The iPad bar: one lighter rounded shape on the dark band, 72 px high. */
#new-toolbox.malka-client-band .toolbox-content-items {
    align-items: center;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    box-shadow: none;
    gap: 0;
    height: 72px;
    padding: 0 12px;
}

#new-toolbox.malka-client-band .toolbox-content-items > div {
    margin-inline-end: 0;
}

#new-toolbox.malka-client-band .toolbox-content-items .toolbox-button {
    min-width: 76px;
}

#new-toolbox.malka-client-band .toolbox-content-items .toolbox-icon {
    background-color: rgba(255, 255, 255, 0.14);
    height: 44px;
    width: 44px;
}

#new-toolbox.malka-client-band .toolbox-content-items .toolbox-icon.toggled {
    background-color: rgba(255, 255, 255, 0.14);
}

@media (hover: hover) and (pointer: fine) {
    #new-toolbox.malka-client-band .toolbox-content-items .toolbox-icon:hover {
        background-color: rgba(255, 255, 255, 0.22);
    }
}

/* Chat open, captions on: a light disc with a dark icon. A muted mic or a
   camera that is off keeps the dark disc; its icon shows the state. */
#new-toolbox.malka-client-band [data-bar-key='chat'] .toolbox-icon.toggled,
#new-toolbox.malka-client-band [data-bar-key='closedcaptions'] .toolbox-icon.toggled {
    background-color: #F4F4F7;
}

#new-toolbox.malka-client-band [data-bar-key='chat'] .toolbox-icon.toggled svg,
#new-toolbox.malka-client-band [data-bar-key='closedcaptions'] .toolbox-icon.toggled svg {
    fill: #06070F;
}

#new-toolbox.malka-client-band .toolbox-content-items .toolbox-label {
    color: #C9CBD8;
    font-size: 11px;
    line-height: 14px;
    margin-top: 3px;
    max-width: 88px;
}

/* End: the red key at the end of the bar (the iPad's End). */
#new-toolbox.malka-client-band .malka-band-end .toolbox-icon,
#new-toolbox.malka-client-band .malka-band-end .toolbox-icon:hover,
#new-toolbox.malka-client-band .malka-band-end .toolbox-icon:active {
    background-color: #D23B3B;
}

#new-toolbox.malka-client-band .malka-band-end .toolbox-icon svg {
    fill: #FFFFFF;
}

@media (hover: hover) and (pointer: fine) {
    #new-toolbox.malka-client-band .malka-band-end .toolbox-button:hover .toolbox-icon {
        background-color: #E04757;
    }
}

#new-toolbox.malka-client-band .malka-band-end .toolbox-button:focus-visible {
    outline: 2px solid #FF8F3A;
    outline-offset: 2px;
}

/* With the chat panel open, the bar band is over the call, not the panel. */
#new-toolbox.malka-client-band.shift-right {
    right: 340px;
    width: auto;
}

/* The controls hide (page 16c): the bar slides down out of the window, the
   top band slides up, the tools on your own video and the names fade, and
   the pointer hides. Hidden keys take no clicks and no keyboard focus. */
html[data-room-controls='hidden'] #new-toolbox.malka-client-band {
    opacity: 0;
    transform: translateY(calc(100% + 8px));
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s linear 200ms;
    visibility: hidden;
}

#vrs-layout-root[data-room-controls='hidden'] [data-room-band='top'] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

#vrs-layout-root[data-room-look='client'] [data-room-chrome] {
    transition: opacity 200ms ease, visibility 0s linear 0s;
}

#vrs-layout-root[data-room-controls='hidden'] [data-room-chrome] {
    opacity: 0;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
    visibility: hidden;
}

html[data-room-controls='hidden'],
html[data-room-controls='hidden'] body * {
    cursor: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #new-toolbox.malka-client-band,
    html[data-room-controls='hidden'] #new-toolbox.malka-client-band,
    #vrs-layout-root[data-room-look='client'] [data-room-chrome],
    #vrs-layout-root[data-room-controls='hidden'] [data-room-chrome] {
        transition: none;
    }
}

/* The chat panel: 340 px, docked at the end of the window at full height, as
   on the iPad. The video gets the rest (VRSLayout adds the panel to its end
   padding), and the top band and the bar band stay over the video. */
#layout_wrapper:has(#vrs-layout-root[data-room-look='client']) {
    position: relative;
}

#layout_wrapper:has(#vrs-layout-root[data-room-look='client']) > #sideToolbarContainer {
    background: #16182B;
    border-left: 1px solid #272A41;
    border-radius: 0;
    bottom: 0;
    box-shadow: none;
    box-sizing: border-box;
    height: auto;
    position: absolute;
    right: 0;
    top: 0;
    width: 340px;
}

/* The chat bubbles of page 16: the other person's on the raised surface, your
   own in the accent with dark text (Maple: white with black text). */
#layout_wrapper:has(#vrs-layout-root[data-room-look='client']) #sideToolbarContainer .chatmessage.remote {
    background: #26293F;
    border-radius: 14px 14px 14px 4px;
}

#layout_wrapper:has(#vrs-layout-root[data-room-look='client']) #sideToolbarContainer .chatmessage.local {
    background: #F47D22;
    border-radius: 14px 14px 4px 14px;
}

#layout_wrapper:has(#vrs-layout-root[data-room-look='client']) #sideToolbarContainer .chatmessage.local .usermessage {
    color: #0D1A38;
}

#layout_wrapper:has(#vrs-layout-root[data-room-brand='maple']) #sideToolbarContainer .chatmessage.local {
    background: #FFFFFF;
}

#layout_wrapper:has(#vrs-layout-root[data-room-brand='maple']) #sideToolbarContainer .chatmessage.local .usermessage {
    color: #0B0B0B;
}

/* Captions with no box (VrsSubtitles: the outline in the opposite tone of
   each picture). Page 16: 28 px at the default size, centred on the video, at
   most 820 px wide, 24 px above the bar band (page 16c: 24 px above the
   window's edge when the bands hide), never over the bands or the chat panel. VrsSubtitles reads this size for the length of a line.
   Latched to the top, they start 16 px below the stage top, so below the bars
   under the call pill (VRSLayout sets --room-captions-top on #videospace). */
#videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles {
    --vrs-subtitles-bottom: 112px;
    --vrs-subtitles-top: var(--room-captions-top, 80px);
    font-size: 28px;
    font-weight: 500;
    left: 40px;
    line-height: 1.36;
    margin: 0 auto;
    max-width: 820px;
    right: 40px;
}

#layout_wrapper:has(> #sideToolbarContainer) #videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles {
    right: 380px;
}

/* The controls hidden: the captions go down to 24 px above the window's edge. */
#videospace:has(> #vrs-layout-root[data-room-controls='hidden']) .vrs-subtitles {
    --vrs-subtitles-bottom: 24px;
}

#videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles.caption-size--small {
    font-size: 20px;
}

#videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles.caption-size--medium {
    font-size: 22px;
}

#videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles.caption-size--large {
    font-size: 28px;
}

#videospace:has(> #vrs-layout-root[data-room-look='client']) .vrs-subtitles.caption-size--extra-large {
    font-size: 36px;
}

/* ============================================
   THE INTERPRETER'S VIDEO ONLY: call mockup 16d (Robert, 2026-11-22:
   "Build 16d", "when mouse moves, should see their name appear").

   In the interpreter's room the Full screen key is "Video only". While the
   room is in full screen, VRSLayout marks <html data-video-only> and only
   the pictures show: chat (with its queue line) and the Tools panel close
   and come back as they were. The bar, the names and the tools on your own
   video show for 3 seconds after a mouse move or a key
   (useRoomControls.web.ts marks <html data-room-controls>). The bars that
   need the interpreter (the hold check, a request to join) stay.
   ============================================ */
html[data-video-only] #sideToolbarContainer,
html[data-video-only] #interpreter-tools-panel {
    display: none !important;
}

html[data-video-only] #new-toolbox {
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s linear 0s;
}

html[data-video-only][data-room-controls='hidden'] #new-toolbox {
    opacity: 0;
    transform: translateY(calc(100% + 8px));
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s linear 200ms;
    visibility: hidden;
}

#vrs-layout-root[data-video-only] [data-room-chrome] {
    transition: opacity 200ms ease, visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
    html[data-video-only] #new-toolbox,
    html[data-video-only][data-room-controls='hidden'] #new-toolbox,
    #vrs-layout-root[data-video-only] [data-room-chrome] {
        transition: none;
    }
}

/* A bar under the call pill (call waiting, on hold, a request to join again)
   fades and slides in on the room's ease: 200 ms, the time in which the video
   gets smaller (clientRoomLook.ts ROOM_MOTION_MS; Robert, 2026-11-20). With
   reduced motion, the bar is just there and nothing moves. */
@keyframes malka-room-bar-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

#vrs-layout-root[data-room-look='client'] [data-room-banners] > * {
    animation: malka-room-bar-in 200ms ease both;
}

@media (prefers-reduced-motion: reduce) {
    #vrs-layout-root[data-room-look='client'] [data-room-banners] > * {
        animation: none;
    }
}

/* On hold (HeldCallBar.web, look 'client'): a 52 px bar under the call
   pill, in its own space. */
#vrs-layout-root .held-call-bar.room-hold-bar {
    background: #17192C;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 0 0 1px #2B2E45;
    font-size: 15px;
    gap: 10px;
    left: auto;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 52px;
    padding: 0 8px 0 16px;
    position: static;
    transform: none;
}

#vrs-layout-root .room-hold-bar .held-call-bar-label {
    align-items: center;
    display: flex;
    font-weight: 600;
    gap: 10px;
    margin-inline-end: 14px;
}

#vrs-layout-root .room-hold-bar .held-call-bar-label svg {
    fill: #F4F4F7;
}

#vrs-layout-root .room-hold-bar .held-call-bar-btn {
    align-items: center;
    background: #26293F;
    border-radius: 10px;
    display: inline-flex;
    font-size: 14px;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
}

#vrs-layout-root .room-hold-bar .held-call-bar-btn.end {
    background: #D23B3B;
}

#vrs-layout-root .room-hold-bar .held-call-bar-btn:focus-visible {
    outline: 2px solid #FF8F3A;
    outline-offset: 2px;
}

#vrs-layout-root .held-call-bar.room-hold-bar.held-call-bar-replies {
    padding: 12px;
    width: 100%;
}

/* A request to join the group call again, in the same stack. */
#vrs-layout-root[data-room-look='client'] .group-join-banner {
    background: #17192C;
    border-radius: 16px;
    box-shadow: 0 0 0 1px #2B2E45;
    left: auto;
    max-width: 100%;
    position: static;
    transform: none;
}
