/**
 * File: public/css/video-call.css
 * Purpose: Premium "blue night + holographic" theme for all video-related views.
 *          Scope: video room (full-screen) + dashboard video sections + incoming alert.
 *          Other plugin sections keep their existing visual.
 *
 * Design tokens are CSS variables, easy to tweak globally.
 */

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
    --vm-bg-deep:        #06091F;
    --vm-bg-mid:         #0D1338;
    --vm-bg-card:        rgba(20, 28, 65, 0.55);
    --vm-bg-card-strong: rgba(20, 28, 65, 0.85);
    --vm-border-soft:    rgba(120, 150, 255, 0.12);
    --vm-border-mid:     rgba(120, 150, 255, 0.25);
    --vm-accent-cyan:    #5EEAD4;
    --vm-accent-violet:  #A78BFA;
    --vm-accent-pink:    #F0ABFC;
    --vm-text-primary:   #E8ECFF;
    --vm-text-secondary: #9BA5D9;
    --vm-text-muted:     #6B73A0;
    --vm-danger:         #cb136e;
    --vm-warning:        #FBBF24;
    --vm-success:        #34D399;
    --vm-holo-gradient:  linear-gradient(135deg, #5EEAD4 0%, #A78BFA 50%, #F0ABFC 100%);

    --vm-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --vm-font-serif: 'Fraunces', Georgia, serif;
}

/* ═══════════════════════════════════════════════════════════
   THEME PLAYER NEUTRALIZATION
   Many WP themes inject custom media players (Plyr, Video.js, MediaElement,
   theme scripts) around every <video> in the page. For our LIVE camera
   previews we do not want any player UI: no play button, no timeline, no
   fullscreen control. Strip controls aggressively on our own video elements.
   ═══════════════════════════════════════════════════════════ */
.vm-video-room video,
.vm-vr-preview video,
.vm-vr-local video,
.vm-vr-remote video {
    pointer-events: none;       /* no interaction needed on live preview */
}
/* Hide native HTML5 controls (Chrome/Edge/Safari) on our videos */
.vm-video-room video::-webkit-media-controls,
.vm-video-room video::-webkit-media-controls-panel,
.vm-video-room video::-webkit-media-controls-enclosure,
.vm-video-room video::-webkit-media-controls-start-playback-button,
.vm-video-room video::-webkit-media-controls-overlay-play-button,
.vm-vr-preview video::-webkit-media-controls,
.vm-vr-preview video::-webkit-media-controls-panel,
.vm-vr-preview video::-webkit-media-controls-enclosure,
.vm-vr-preview video::-webkit-media-controls-start-playback-button,
.vm-vr-preview video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* ─── NUCLEAR OPTION ───
   Hide EVERY child of our containers that is NOT explicitly authorized.
   Themes often inject <button>, <div class="play">, <span class="volume">…
   as siblings of <video>. We can't enumerate every possible class, so we
   whitelist what we want and hide everything else. */
.vm-vr-preview > *:not(video):not(.vm-vr-preview__placeholder):not(.mejs-container),
.vm-vr-local   > *:not(video):not(.mejs-container),
.vm-vr-remote  > *:not(video):not(.vm-vr-remote__placeholder):not(.mejs-container) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -99999px !important;
}

/* ─── MediaElement.js (WordPress default player) ───
   Even if we dequeued it server-side, some themes/plugins may still load it.
   Belt-and-suspenders: neutralize every visible UI part of MediaElement
   that's INSIDE our video containers. We keep the <video> visible (it's
   inside .mejs-mediaelement) by un-styling the wrapper layers so the video
   takes the full container space, and we hide all controls/overlays. */
.vm-vr-preview .mejs-container,
.vm-vr-local   .mejs-container,
.vm-vr-remote  .mejs-container {
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    position: static !important;
}
.vm-vr-preview .mejs-inner,
.vm-vr-local   .mejs-inner,
.vm-vr-remote  .mejs-inner,
.vm-vr-preview .mejs-mediaelement,
.vm-vr-local   .mejs-mediaelement,
.vm-vr-remote  .mejs-mediaelement {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    background: transparent !important;
}
.vm-vr-preview .mejs-controls,
.vm-vr-preview .mejs-layers,
.vm-vr-preview .mejs-overlay,
.vm-vr-preview .mejs-overlay-play,
.vm-vr-preview .mejs-button,
.vm-vr-preview .mejs-time,
.vm-vr-preview .mejs-time-rail,
.vm-vr-local   .mejs-controls,
.vm-vr-local   .mejs-layers,
.vm-vr-local   .mejs-overlay,
.vm-vr-local   .mejs-overlay-play,
.vm-vr-local   .mejs-button,
.vm-vr-local   .mejs-time,
.vm-vr-local   .mejs-time-rail,
.vm-vr-remote  .mejs-controls,
.vm-vr-remote  .mejs-layers,
.vm-vr-remote  .mejs-overlay,
.vm-vr-remote  .mejs-overlay-play,
.vm-vr-remote  .mejs-button,
.vm-vr-remote  .mejs-time,
.vm-vr-remote  .mejs-time-rail {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════
   GENERIC HELPERS
   ═══════════════════════════════════════════════════════════ */
.vm-hidden { display: none !important; }

.vm-btn-visio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--vm-border-mid);
    background: rgba(255, 255, 255, 0.04);
    color: var(--vm-text-primary);
    cursor: pointer;
    font-family: var(--vm-font-sans);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.vm-btn:hover  { background: rgba(255, 255, 255, 0.08); border-color: var(--vm-accent-cyan) !important; }
.vm-btn:active { transform: scale(0.98); }

.vm-btn-visio--primary {
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    color: var(--vm-bg-deep);
    border: none;
    font-weight: 600;
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.35);
    border: none;
	color: #cb136e !important;
}
.vm-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.vm-btn--ghost { background: transparent; }

@keyframes vm-holo-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes vm-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   INCOMING VIDEO ALERT (voyant side, floating on any dashboard section)
   ═══════════════════════════════════════════════════════════ */
.vm-video-incoming {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--vm-border-mid);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(6, 9, 31, 0.5);
    z-index: 9999;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--vm-text-primary);
    font-family: var(--vm-font-sans);
    overflow: hidden;
}
.vm-video-incoming::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0.6;
    animation: vm-holo-shift 4s ease-in-out infinite;
    filter: blur(12px);
}
.vm-video-incoming--visible {
    transform: translateX(0);
    animation: vm-vi-shake 0.6s ease-in-out;
}
@keyframes vm-vi-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}
.vm-video-incoming__inner {
    position: relative;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    background: var(--vm-bg-card-strong);
    border-radius: 16px;
}
.vm-video-incoming__icon {
    font-size: 28px;
    line-height: 1;
    padding-top: 4px;
    background: var(--vm-holo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.5));
}
.vm-video-incoming__body { flex: 1; min-width: 200px; }
.vm-video-incoming__title {
    margin: 0 0 4px;
    font-family: var(--vm-font-serif);
    font-weight: 400;
    font-size: 15px;
    color: var(--vm-text-primary);
}
.vm-video-incoming__sub {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--vm-text-secondary);
}
.vm-video-incoming__timer {
    margin: 0;
    font-size: 12px;
    color: var(--vm-text-muted);
}
.vm-video-incoming__timer strong { color: var(--vm-accent-cyan); }
.vm-video-incoming__actions {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}
.vm-video-incoming .vm-btn { font-size: 13px; padding: 8px 14px; }

@media (max-width: 480px) {
    .vm-video-incoming {
        top: auto;
        bottom: 16px;
        left: 16px;
        right: 16px;
        width: auto;
    }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD VIDEO SECTIONS (voyant + consultant)
   ═══════════════════════════════════════════════════════════ */
.vm-video-section,
.vm-cv-section {
    padding: 16px 0;
    color: var(--vm-text-primary);
    font-family: var(--vm-font-sans);
    position: relative;
}

.vm-video-section h2,
.vm-cv-section h2 {
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 28px;
    margin: 0 0 6px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: vm-holo-shift 6s ease-in-out infinite;
}

.vm-video-section h3,
.vm-cv-section h3 {
    font-family: var(--vm-font-serif);
    font-weight: 400;
    font-size: 19px;
    margin: 28px 0 14px;
    color: #7f71af !important;
}

/* ─── Voyant: active session banner ─── */
.vm-video-active-banner {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.08), rgba(167, 139, 250, 0.08));
    border: 1px solid var(--vm-accent-cyan);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 0 24px rgba(94, 234, 212, 0.15);
}
.vm-video-active-banner strong { color: var(--vm-accent-cyan); }
.vm-video-active-banner p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--vm-text-secondary);
}

/* ─── Stats grid (voyant) ─── */
.vm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0 28px;
}
.vm-stat {
    background: var(--vm-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--vm-border-soft);
    border-radius: 14px;
    padding: 18px 20px;
    transition: border-color 0.2s, transform 0.2s;
}
.vm-stat:hover {
    border-color: var(--vm-border-mid);
    transform: translateY(-2px);
}
.vm-stat__label {
    font-size: 11px;
    color: var(--vm-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}
.vm-stat__value {
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 30px;
    margin-top: 6px;
    background: var(--vm-holo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vm-stat__hint  {
    font-size: 13px;
    color: var(--vm-text-muted);
    margin-top: 2px;
}

/* ─── Table (voyant history) ─── */
.vm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: var(--vm-bg-card);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: hidden;
}
.vm-table th, .vm-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--vm-border-soft);
    font-size: 14px;
	background-color: #12143200 !important;
	font-family: 'Fraunces';
	    color: #fff !important;
}
.vm-table th {
    color: var(--vm-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.15);
}
.vm-table tr:last-child td { border-bottom: none; }

.vm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}
.vm-badge--active  { background: rgb(52 211 153 / 84%); color: #fff; border: 1px solid rgba(52, 211, 153, 0.3); }

.vm-badge--pending { background: rgb(251 191 36 / 71%); color: #fff; border: 1px solid rgba(251, 191, 36, 0.3); }

.vm-badge--ended {
    background: rgb(155 165 217 / 61%);
    color: #ffffff;
    border: 1px solid var(--vm-border-soft);
}

.vm-badge--expired { background: rgb(251 113 133 / 70%); color: #fff; border: 1px solid rgba(251, 113, 133, 0.3); }

.vm-empty {
    color: var(--vm-text-muted);
    font-style: italic;
    padding: 24px 0;
}

.vm-summary-details summary {
    cursor: pointer;
    color: #ab87e9 !important;
    font-size: 14px !important;
    font-weight: 600;
    padding: .4rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    user-select: none;
}

/* ─── Consultant: balance + low-balance ─── */
.vm-cv-low-balance {
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid var(--vm-danger);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.vm-cv-low-balance p { margin: 0; color: var(--vm-text-secondary); }
.vm-cv-low-balance strong { color: var(--vm-danger); }

.vm-cv-balance {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.06), rgba(167, 139, 250, 0.06));
    border: 1px solid var(--vm-border-mid);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 22px;
    color: #7f71af;
    font-size: 14px;
}
.vm-cv-balance strong { color: #14b79e; font-weight: 500; }

/* ─── Consultant: voyant cards ─── */
.vm-cv-voyants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.vm-cv-voyant {
    background: rgb(255 255 255 / 55%);
    backdrop-filter: blur(20px);
    border: 1px solid rgb(120 150 255 / 33%);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.vm-cv-voyant:hover {
    border-color: var(--vm-border-mid);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(94, 234, 212, 0.12);
}

.vm-cv-voyant__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--vm-bg-mid);
    flex-shrink: 0;
    padding: 2px;
    border: 2px solid transparent;
    background-image:
        linear-gradient(var(--vm-bg-deep), var(--vm-bg-deep)),
        var(--vm-holo-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.vm-cv-voyant__info { flex: 1; min-width: 0; }
.vm-cv-voyant__name {
    font-family: var(--vm-font-serif);
    font-weight: 400;
    font-size: 17px;
    color: #7f71af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vm-cv-voyant__rate {
    font-size: 13px;
    color: var(--vm-text-secondary);
    margin-top: 4px;
}

.vm-cv-launch {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 13px;
}

/* ─── Waiting overlay ─── */
.vm-cv-waiting {
    position: fixed;
    inset: 0;
    background: rgba(6, 9, 31, 0.92);
    backdrop-filter: blur(20px);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--vm-text-primary);
    font-family: var(--vm-font-sans);
}
.vm-cv-waiting__card {
    background: var(--vm-bg-card-strong);
    border: 1px solid var(--vm-border-mid);
    border-radius: 22px;
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
}
.vm-cv-waiting__card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.5;
    animation: vm-holo-shift 4s ease-in-out infinite;
}

.vm-cv-waiting__ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--vm-accent-cyan), var(--vm-accent-violet), var(--vm-accent-pink), transparent);
    animation: vm-spin 1.6s linear infinite;
    position: relative;
}
.vm-cv-waiting__ring::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--vm-bg-card-strong);
}
@keyframes vm-spin { to { transform: rotate(360deg); } }

.vm-cv-waiting__card h3 {
    margin: 0 0 14px;
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 22px;
}
.vm-cv-waiting__card p {
    margin: 8px 0;
    color: var(--vm-text-secondary);
    font-size: 14px;
}
.vm-cv-waiting__card strong { color: var(--vm-text-primary); }
.vm-cv-waiting__timer   {
    font-size: 13px;
    color: var(--vm-text-muted);
    margin-top: 6px;
}
.vm-cv-waiting__timer strong { color: var(--vm-accent-cyan); }

.vm-cv-waiting__cancel {
    margin-top: 24px;
    color: var(--vm-danger);
    border-color: rgba(251, 113, 133, 0.4);
    background: transparent;
}
.vm-cv-waiting__cancel:hover {
    background: rgba(251, 113, 133, 0.1);
    border-color: var(--vm-danger);
}

/* ─── Error toast ─── */
.vm-cv-error {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(251, 113, 133, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(251, 113, 133, 0.4);
    z-index: 9700;
    font-size: 14px;
    max-width: 90vw;
    font-family: var(--vm-font-sans);
}

/* ─── Profile button (on voyant public profile) ─── */
.vm-profile-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    color: var(--vm-bg-deep);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--vm-font-sans);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-profile-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.4);
    color: var(--vm-bg-deep);
}
.vm-profile-video-btn--disabled {
    background: #4b5563;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
    animation: none;
}

@media (max-width: 640px) {
    .vm-cv-voyants { grid-template-columns: 1fr; }
    .vm-cv-voyant { flex-wrap: wrap; }
    .vm-cv-launch { width: 100%; margin-top: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   VIDEO ROOM (full-screen, holographic theme)
   ═══════════════════════════════════════════════════════════ */
.vm-video-room {
    position: fixed;
    inset: 0;
    background: var(--vm-bg-deep);
    color: var(--vm-text-primary);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--vm-font-sans);
}

/* Background: nebula + drifting stars */
.vm-video-room::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(167, 139, 250, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(94, 234, 212, 0.12), transparent 60%),
        radial-gradient(circle at 50% 50%, var(--vm-bg-mid) 0%, var(--vm-bg-deep) 70%);
    z-index: 0;
}
.vm-video-room::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 30% 90%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90% 50%, white, transparent),
        radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 45% 15%, white, transparent);
    background-size: 800px 800px;
    z-index: 1;
    opacity: 0.4;
    animation: vm-drift 120s linear infinite;
    pointer-events: none;
}
@keyframes vm-drift {
    from { background-position: 0 0; }
    to   { background-position: 800px 800px; }
}

.vm-video-room > * { position: relative; z-index: 2; }

/* ─── Header ─── */
.vm-vr-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(6, 9, 31, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--vm-border-soft);
    gap: 14px;
}

.vm-vr-back {
    background: transparent;
    border: 1px solid var(--vm-border-mid);
    color: var(--vm-text-primary);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.vm-vr-back:hover { background: rgba(255,255,255,0.05); border-color: var(--vm-accent-cyan); }

.vm-vr-peer { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }

.vm-vr-peer__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 2px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    position: relative;
    animation: vm-holo-shift 4s ease-in-out infinite;
    flex-shrink: 0;
}
.vm-vr-peer__avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
    animation: vm-holo-shift 4s ease-in-out infinite, vm-pulse 3s ease-in-out infinite;
}
.vm-vr-peer__avatar::after {
    content: attr(data-initial);
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--vm-bg-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--vm-font-serif);
    font-size: 18px;
    color: var(--vm-accent-cyan);
}

.vm-vr-peer__name {
    font-family: var(--vm-font-serif);
    font-weight: 400;
    font-size: 17px;
    letter-spacing: 0.3px;
}
.vm-vr-peer__status {
    font-size: 12px;
    color: var(--vm-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.vm-vr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vm-text-muted);
}
.vm-vr-dot--connecting { background: var(--vm-warning); animation: vm-pulse 1.2s ease-in-out infinite; box-shadow: 0 0 8px var(--vm-warning); }
.vm-vr-dot--connected  { background: var(--vm-success); box-shadow: 0 0 10px var(--vm-success); animation: vm-pulse 2.5s ease-in-out infinite; }
.vm-vr-dot--ended      { background: var(--vm-danger); }

/* ─── Network quality bars (4 bars, like a phone signal) ─── */
.vm-vr-signal {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}
.vm-vr-signal.vm-active { opacity: 1; }
.vm-vr-signal > span {
    width: 3px;
    background: var(--vm-text-muted);
    border-radius: 1px;
    opacity: 0.3;
    transition: background 0.3s, opacity 0.3s;
}
.vm-vr-signal > span:nth-child(1) { height: 4px; }
.vm-vr-signal > span:nth-child(2) { height: 7px; }
.vm-vr-signal > span:nth-child(3) { height: 10px; }
.vm-vr-signal > span:nth-child(4) { height: 14px; }
.vm-vr-signal > span.vm-on { opacity: 1; }
.vm-vr-signal > span.vm-on.vm-high { background: var(--vm-success); }
.vm-vr-signal > span.vm-on.vm-mid  { background: var(--vm-accent-cyan); }
.vm-vr-signal > span.vm-on.vm-low  { background: var(--vm-warning); }
.vm-vr-signal > span.vm-on.vm-bad  { background: var(--vm-danger); }

/* ─── Timer ─── */
.vm-vr-timer {
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding: 6px 18px;
    border-radius: 14px;
    border: 1px solid var(--vm-border-mid);
    background: var(--vm-bg-card);
    backdrop-filter: blur(12px);
    min-width: 130px;
    transition: border-color 0.3s, background 0.3s;
}
.vm-vr-timer__label {
    font-size: 10px;
    color: var(--vm-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}
.vm-vr-timer__value {
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 26px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: vm-holo-shift 6s ease-in-out infinite;
    line-height: 1.1;
    margin: 2px 0;
}
.vm-vr-timer__cost { font-size: 11px; color: var(--vm-text-secondary); }
.vm-vr-timer.vm-warn {
    border-color: var(--vm-warning);
    background: rgba(251, 191, 36, 0.08);
}
.vm-vr-timer.vm-warn .vm-vr-timer__value {
    background: none;
    -webkit-text-fill-color: var(--vm-warning);
}
.vm-vr-timer.vm-danger {
    border-color: var(--vm-danger);
    background: rgba(251, 113, 133, 0.12);
    animation: vm-danger-pulse 0.8s ease-in-out infinite;
}
.vm-vr-timer.vm-danger .vm-vr-timer__value {
    background: none;
    -webkit-text-fill-color: var(--vm-danger);
    animation: none;
}
@keyframes vm-danger-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.4); }
    50%      { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(251, 113, 133, 0); }
}

/* ─── Stage ─── */
.vm-vr-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.vm-vr-remote {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1f4a 0%, #0a0e2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Holographic halo around the remote video, animated when they're speaking */
.vm-vr-remote::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 26px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s;
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-remote.vm-speaking::before { opacity: 1; }
.vm-vr-remote.vm-speaking::after {
    content: '';
    position: absolute;
    inset: -25px;
    border-radius: 36px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    filter: blur(35px);
    opacity: 0.4;
    z-index: -1;
    animation: vm-holo-shift 4s ease-in-out infinite;
    pointer-events: none;
}

.vm-vr-remote video {
    position: absolute;
    inset: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    object-fit: cover;
    border-radius: 22px;
    z-index: 1;
}

.vm-vr-remote__placeholder {
    color: var(--vm-text-muted);
    font-family: var(--vm-font-serif);
    font-size: 17px;
    text-align: center;
    padding: 20px;
    z-index: 1;
}
.vm-vr-remote__placeholder strong { color: var(--vm-text-secondary); }

/* ─── Local mini ─── */
.vm-vr-local {
    position: absolute;
    top: 36px;
    right: 36px;
    width: 200px;
    height: 270px;
    background: var(--vm-bg-mid);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--vm-border-mid);
    z-index: 5;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.vm-vr-local.vm-speaking {
    border-color: var(--vm-accent-cyan);
    box-shadow: 0 16px 40px rgba(94, 234, 212, 0.4), 0 0 0 2px var(--vm-accent-cyan);
}
.vm-vr-local video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror */
}

/* ─── Controls ─── */
.vm-vr-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 22px 16px 28px;
    background: rgba(6, 9, 31, 0.7);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--vm-border-soft);
}
.vm-vr-ctrl {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--vm-border-mid);
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(20px);
    color: var(--vm-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.vm-vr-ctrl:hover {
    background: var(--vm-bg-card);
    border-color: var(--vm-accent-cyan);
    transform: translateY(-2px);
}
.vm-vr-ctrl:active { transform: scale(0.95); }
.vm-vr-ctrl.vm-off {
    background: rgba(251, 113, 133, 0.2);
    border-color: var(--vm-danger);
    color: var(--vm-danger);
}
.vm-vr-ctrl--end {
    background: var(--vm-danger);
    border-color: var(--vm-danger);
    width: 64px;
    height: 64px;
    color: white;
    margin: 0 8px;
}
.vm-vr-ctrl--end:hover {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 8px 24px rgba(251, 113, 133, 0.5);
}
.vm-vr-ctrl--end svg { stroke: white; }

/* ─── Chat toggle (floating button) ─── */
.vm-vr-chat-toggle {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--vm-border-mid);
    color: var(--vm-text-primary);
    cursor: pointer;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.vm-vr-chat-toggle:hover {
    background: var(--vm-bg-card);
    border-color: var(--vm-accent-cyan);
    transform: scale(1.05);
}
.vm-vr-chat-toggle__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--vm-accent-pink);
    color: var(--vm-bg-deep);
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.vm-vr-chat-toggle__badge[data-count="0"] { display: none; }

/* ─── Chat panel ─── */
.vm-vr-chat {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--vm-border-soft);
    z-index: 9;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.vm-vr-chat.vm-open { transform: translateX(0); }

.vm-vr-chat__header {
    flex-shrink: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--vm-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vm-vr-chat__title {
    font-family: var(--vm-font-serif);
    font-weight: 400;
    font-size: 17px;
}
.vm-vr-chat__close {
    background: transparent;
    border: none;
    color: var(--vm-text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    border-radius: 6px;
}
.vm-vr-chat__close:hover { color: var(--vm-text-primary); }

.vm-vr-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vm-vr-chat__messages::-webkit-scrollbar { width: 6px; }
.vm-vr-chat__messages::-webkit-scrollbar-thumb { background: var(--vm-border-mid); border-radius: 3px; }

.vm-vr-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}
.vm-vr-msg--me {
    align-self: flex-end;
    background: rgba(94, 234, 212, 0.12);
    border: 1px solid rgba(94, 234, 212, 0.25);
    border-bottom-right-radius: 4px;
    color: var(--vm-text-primary);
}
.vm-vr-msg--other {
    align-self: flex-start;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-bottom-left-radius: 4px;
    color: var(--vm-text-primary);
}
/* Voyant messages get a slightly different style (emphasis as "note") */
.vm-vr-msg--voyant-note {
    background: rgba(240, 171, 252, 0.1);
    border-color: rgba(240, 171, 252, 0.3);
    border-left: 3px solid var(--vm-accent-pink);
}
.vm-vr-msg__who {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vm-text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.vm-vr-msg__time {
    font-size: 10px;
    color: var(--vm-text-muted);
    margin-top: 4px;
    text-align: right;
}

.vm-vr-chat__empty {
    color: var(--vm-text-muted);
    font-style: italic;
    text-align: center;
    padding: 32px 16px;
    font-size: 13px;
}

.vm-vr-chat__input {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--vm-border-soft);
    display: flex;
    gap: 8px;
}
.vm-vr-chat__input input {
    flex: 1;
    background: var(--vm-bg-deep);
    border: 1px solid var(--vm-border-mid);
    border-radius: 12px;
    padding: 11px 16px;
    color: var(--vm-text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.vm-vr-chat__input input:focus { border-color: var(--vm-accent-cyan); }
.vm-vr-chat__input input::placeholder { color: var(--vm-text-muted); }

.vm-vr-chat__send {
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    color: var(--vm-bg-deep);
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.15s;
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-chat__send:hover { transform: scale(1.05); }
.vm-vr-chat__send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Pre-call modal ─── */
.vm-vr-precall {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 31, 0.92);
    backdrop-filter: blur(16px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s;
}
.vm-vr-precall.vm-hidden { opacity: 0; pointer-events: none; }

.vm-vr-precall__card {
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(30px);
    border: 1px solid var(--vm-border-mid);
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    position: relative;
}
.vm-vr-precall__card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-precall__card h2 {
    margin: 0 0 6px;
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 24px;
    text-align: center;
}
.vm-vr-precall__sub {
    text-align: center;
    color: var(--vm-text-secondary);
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.5;
}
.vm-vr-precall__sub strong { color: var(--vm-text-primary); }

.vm-vr-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--vm-bg-deep);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}
.vm-vr-preview video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: none;
}
.vm-vr-preview__placeholder {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--vm-text-muted);
    font-size: 13px;
}

.vm-vr-mic-test {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--vm-text-secondary);
    font-size: 12px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--vm-bg-deep);
    border-radius: 10px;
    border: 1px solid var(--vm-border-soft);
}
.vm-vr-mic-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}
.vm-vr-mic-bars span {
    flex: 1;
    background: var(--vm-border-mid);
    border-radius: 2px;
    opacity: 0.4;
    transition: opacity 0.1s, background 0.1s;
}
.vm-vr-mic-bars span:nth-child(1) { height: 25%; }
.vm-vr-mic-bars span:nth-child(2) { height: 45%; }
.vm-vr-mic-bars span:nth-child(3) { height: 60%; }
.vm-vr-mic-bars span:nth-child(4) { height: 80%; }
.vm-vr-mic-bars span:nth-child(5) { height: 100%; }
.vm-vr-mic-bars span.vm-on { background: var(--vm-accent-cyan); opacity: 1; }

.vm-vr-precall__error {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.4);
    color: var(--vm-danger);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
}

.vm-vr-join-btn {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-family: var(--vm-font-serif);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ─── Warning toast (low balance during call) ─── */
.vm-vr-warning {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(251, 191, 36, 0.95);
    backdrop-filter: blur(10px);
    color: #78350f;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.4);
    z-index: 40;
}

/* ─── Recap (end of session) ─── */
.vm-vr-recap {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 31, 0.96);
    backdrop-filter: blur(20px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vm-vr-recap__card {
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(30px);
    border: 1px solid var(--vm-border-mid);
    border-radius: 22px;
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    position: relative;
}
.vm-vr-recap__card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0.4;
    filter: blur(20px);
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-recap__card h2 {
    margin: 0 0 26px;
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 24px;
	color: #00ffde !important;
}
.vm-vr-recap__stats {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin-bottom: 18px;
}
.vm-vr-recap__label {
    font-size: 17px;
    color: #d5d8ed;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.vm-vr-recap__value {
    font-family: var(--vm-font-serif);
    font-weight: 300;
    font-size: 30px;
    margin-top: 6px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: vm-holo-shift 6s ease-in-out infinite;
}
.vm-vr-recap__reason {
    color: var(--vm-text-secondary);
    font-size: 14px;
    margin: 0 0 26px;
}

/* Consultant follow-up CTAs (review + top-up) */
.vm-vr-recap__cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 0 18px;
}
.vm-vr-recap__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--vm-font-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--vm-border-mid);
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.vm-vr-recap__cta-btn--review {
    background: rgba(34, 211, 238, 0.1);
    color: var(--vm-accent-cyan) !important;
    border-color: rgba(34, 211, 238, 0.4);
}
.vm-vr-recap__cta-btn--review:hover {
    background: rgba(34, 211, 238, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(34, 211, 238, 0.25);
}
.vm-vr-recap__cta-btn--topup {
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    color: #fff !important;
    border: none;
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-recap__cta-btn--topup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(167, 139, 250, 0.45);
}
.vm-vr-recap__cta-btn--tip {
    background: rgba(236, 72, 153, 0.12);
    color: #f9a8d4;
    border-color: rgba(236, 72, 153, 0.4);
    cursor: pointer;
}
.vm-vr-recap__cta-btn--tip:hover {
    background: rgba(236, 72, 153, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(236, 72, 153, 0.3);
}

/* ─── Error fallback ─── */
.vm-video-error {
    padding: 60px 24px;
    text-align: center;
    color: var(--vm-text-secondary);
    font-family: var(--vm-font-sans);
}
.vm-video-error p {
    margin: 0 0 22px;
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   ARRIVAL EFFECT (participant connected)
   ═══════════════════════════════════════════════════════════ */
.vm-vr-remote.vm-arrived {
    animation: vm-arrival-pulse 1.8s ease-out;
}
.vm-vr-remote.vm-arrived::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 3px var(--vm-accent-cyan), 0 0 60px 8px rgba(34, 211, 238, 0.55);
    opacity: 0;
    animation: vm-arrival-halo 1.8s ease-out;
}
@keyframes vm-arrival-pulse {
    0%   { transform: scale(1); }
    18%  { transform: scale(1.012); }
    40%  { transform: scale(1); }
}
@keyframes vm-arrival-halo {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    100% { opacity: 0; }
}

.vm-vr-arrival-toast {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--vm-border-mid);
    color: var(--vm-text-primary);
    font-family: var(--vm-font-sans);
    font-size: 14px;
    font-weight: 500;
    padding: 11px 20px;
    border-radius: 999px;
    z-index: 60;
    opacity: 0;
    transition: opacity 0.4s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 28px rgba(6, 9, 31, 0.5);
    white-space: nowrap;
}
.vm-vr-arrival-toast.vm-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ═══════════════════════════════════════════════════════════
   TYPING INDICATOR ("… écrit")
   ═══════════════════════════════════════════════════════════ */
.vm-vr-chat__typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 10px;
    font-family: var(--vm-font-sans);
    font-size: 12.5px;
    color: var(--vm-text-secondary);
    font-style: italic;
}
.vm-vr-typing-dots {
    display: inline-flex;
    gap: 3px;
}
.vm-vr-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--vm-accent-cyan);
    opacity: 0.4;
    animation: vm-typing-bounce 1.2s infinite ease-in-out;
}
.vm-vr-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.vm-vr-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes vm-typing-bounce {
    0%, 60%, 100% { transform: translateY(0);    opacity: 0.4; }
    30%           { transform: translateY(-4px); opacity: 1;   }
}

/* ═══════════════════════════════════════════════════════════
   CONFIRM MODAL (styled replacement for native confirm())
   ═══════════════════════════════════════════════════════════ */
.vm-vr-modal {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 31, 0.8);
    backdrop-filter: blur(10px);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s;
}
.vm-vr-modal.vm-open { opacity: 1; }
.vm-vr-modal__card {
    background: var(--vm-bg-card-strong);
    backdrop-filter: blur(30px);
    border: 1px solid var(--vm-border-mid);
    border-radius: 20px;
    padding: 28px 26px;
    max-width: 380px;
    width: 100%;
    position: relative;
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vm-vr-modal.vm-open .vm-vr-modal__card { transform: scale(1); }
.vm-vr-modal__card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: var(--vm-holo-gradient);
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0.4;
    filter: blur(16px);
    animation: vm-holo-shift 4s ease-in-out infinite;
}
.vm-vr-modal__msg {
    margin: 0 0 22px;
    font-family: var(--vm-font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--vm-text-primary);
    text-align: center;
}
.vm-vr-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.vm-vr-modal__cancel,
.vm-vr-modal__ok {
    padding: 11px 22px;
    border-radius: 10px;
    font-family: var(--vm-font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--vm-border-mid);
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.vm-vr-modal__cancel {
    background: transparent;
    color: var(--vm-text-secondary);
}
.vm-vr-modal__cancel:hover {
    background: rgba(255,255,255,0.05);
    color: var(--vm-text-primary);
    border-color: var(--vm-accent-cyan);
}
.vm-vr-modal__ok {
    background: var(--vm-danger);
    border-color: var(--vm-danger);
    color: white;
    font-weight: 600;
}
.vm-vr-modal__ok:hover {
    background: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(251, 113, 133, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Header compact: only peer info + timer. The back button is moved to the
       bottom controls area so the narrow top bar no longer overlaps. */
    .vm-vr-header {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }
    .vm-vr-peer { gap: 8px; }
    .vm-vr-peer__name { font-size: 14px; }
    .vm-vr-peer__avatar { width: 34px; height: 34px; }
    .vm-vr-peer__avatar::after { font-size: 13px; }
    .vm-vr-peer__status { font-size: 11px; }
    .vm-vr-timer {
        min-width: auto;
        padding: 4px 12px;
        text-align: right;
    }
    .vm-vr-timer__value { font-size: 19px; }
    .vm-vr-timer__label { font-size: 9px; }

    /* Back button is moved (via JS) into the controls bar on mobile.
       Style it like a round control next to mic/cam/hang-up. */
    .vm-vr-controls .vm-vr-back {
        position: static;
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        background: var(--vm-bg-card-strong);
        backdrop-filter: blur(20px);
        border: 1px solid var(--vm-border-mid);
    }
    .vm-vr-back__label { display: none; }  /* hide "Dashboard" text on mobile */
    .vm-vr-back span[aria-hidden="true"] { font-size: 20px; }

    .vm-vr-stage { padding: 10px; }
    .vm-vr-remote {
        aspect-ratio: auto;
        height: 100%;
    }

    .vm-vr-local {
        width: 110px;
        height: 150px;
        top: 18px;
        right: 18px;
        border-radius: 12px;
    }

    .vm-vr-chat-toggle {
        width: 46px;
        height: 46px;
        bottom: 16px;
        right: 16px;
    }

    .vm-vr-chat { width: 100%; max-width: 100%; }

    .vm-vr-ctrl { width: 50px; height: 50px; }
    .vm-vr-ctrl--end { width: 56px; height: 56px; }
    .vm-vr-controls { gap: 10px; padding: 16px 12px 22px; }

    .vm-vr-precall__card { padding: 28px 22px; }
    .vm-vr-precall__card h2 { font-size: 20px; }
    .vm-vr-recap__stats { gap: 18px; }
    .vm-vr-recap__value { font-size: 26px; }
}
