/* Group chats + group calls */
.vg-gav { position: relative; display: inline-block; flex-shrink: 0; }
.vg-gav img { position: absolute; width: 68%; height: 68%; border-radius: 9999px; object-fit: cover; border: 2px solid #fff; background: #e5e5e5; }
.vg-gav .a { top: 0; left: 0; } .vg-gav .b { bottom: 0; right: 0; }
.dark .vg-gav img { border-color: #171717; background: #404040; }

/* chat bubbles in groups */
.vg-sys { text-align: center; font-size: 11px; color: #737373; padding: .15rem 1rem; }
.vg-sys span { display: inline-block; background: rgba(0,0,0,.05); border-radius: 9999px; padding: .25rem .75rem; max-width: 92%; overflow-wrap: anywhere; }
.dark .vg-sys span { background: rgba(255,255,255,.08); color: #a3a3a3; }
.vg-from { display: flex; align-items: flex-end; gap: .5rem; }
.vg-from > a > img, .vg-from > img { width: 1.75rem; height: 1.75rem; border-radius: 9999px; object-fit: cover; flex-shrink: 0; }
.vg-sname { font-size: 10px; font-weight: 700; color: #737373; margin: 0 0 .15rem .25rem; }
.vg-seen { font-size: 10px; color: #a3a3a3; text-align: right; padding-right: .25rem; margin-top: -.1rem; }
.vg-callbar { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.25rem; background: #ecfdf5; border-bottom: 1px solid #a7f3d0; font-size: 12px; color: #065f46; }
.dark .vg-callbar { background: #022c22; border-color: #065f46; color: #6ee7b7; }
.vg-callbar b { font-weight: 700; } .vg-callbar .grow { flex: 1; min-width: 0; }
.vg-callbar button { background: #10b981; color: #fff; font-weight: 700; font-size: 12px; padding: .35rem 1rem; border-radius: 9999px; }
.vg-callbar button:disabled { opacity: .5; }
.vg-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #10b981; display: inline-block; animation: vgpulse 1.4s infinite; }
@keyframes vgpulse { 50% { opacity: .35; } }
.vg-muted-ic { color: #a3a3a3; width: .9rem; height: .9rem; flex-shrink: 0; }

/* group info panel */
.vg-gi { color: #171717; max-height: 86vh; display: flex; flex-direction: column; }
.dark .vg-gi { color: #f5f5f5; }
.vg-gi-top { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid rgba(128,128,128,.2); }
.vg-gi-title { font-weight: 800; font-size: .9rem; } .vg-gi-x { width: 2rem; color: #737373; display: inline-flex; }
.vg-gi-body { overflow-y: auto; padding: 1rem 1.1rem 1.2rem; }
.vg-gi-hero { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; margin-bottom: 1rem; }
.vg-gi-photo { position: relative; border-radius: 9999px; } .vg-gi-photo.can { cursor: pointer; }
.vg-gi-cam { position: absolute; right: 0; bottom: 0; background: #3b82f6; color: #fff; border-radius: 9999px; padding: .35rem; display: inline-flex; border: 2px solid #fff; }
.dark .vg-gi-cam { border-color: #171717; }
.vg-gi-link { font-size: 11px; color: #ef4444; font-weight: 600; }
.vg-gi-namebox { display: flex; gap: .5rem; width: 100%; max-width: 20rem; justify-content: center; }
.vg-gi-namebox input { flex: 1; min-width: 0; text-align: center; font-weight: 800; font-size: 1rem; background: transparent; border-bottom: 1px solid rgba(128,128,128,.3); padding: .25rem; outline: none; }
.vg-gi-nametxt { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
.vg-gi-save { background: #3b82f6; color: #fff; font-size: 12px; font-weight: 700; border-radius: 9999px; padding: .25rem .9rem; }
.hidden.vg-gi-save { display: none; }
.vg-gi-count { font-size: 12px; color: #737373; }
.vg-gi-call { display: flex; align-items: center; gap: .6rem; background: #ecfdf5; color: #065f46; border-radius: 1rem; padding: .65rem .9rem; margin-bottom: .9rem; font-size: 12px; }
.dark .vg-gi-call { background: #022c22; color: #6ee7b7; }
.vg-gi-call div { flex: 1; } .vg-gi-call button { background: #10b981; color: #fff; font-weight: 700; border-radius: 9999px; padding: .35rem 1rem; } .vg-gi-call button:disabled { opacity: .5; }
.vg-gi-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.vg-gi-quick button { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .65rem .25rem; border-radius: 1rem; background: rgba(128,128,128,.1); font-size: 11px; font-weight: 600; }
.vg-gi-quick button.on { color: #ef4444; }
.vg-gi-sec { margin-bottom: 1rem; } .vg-gi-h { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: #737373; margin-bottom: .4rem; }
.vg-gi-set { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.vg-gi-st { font-size: 13px; font-weight: 600; } .vg-gi-ss { font-size: 11px; color: #737373; }
.vg-switch { position: relative; flex-shrink: 0; width: 2.6rem; height: 1.5rem; border-radius: 9999px; background: #d4d4d4; transition: background .15s; }
.vg-switch span { position: absolute; top: .15rem; left: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 9999px; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.vg-switch.on { background: #3b82f6; } .vg-switch.on span { transform: translateX(1.1rem); }
.vg-gi-mrow { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; }
.vg-gi-mlink { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; }
.vg-gi-mav { width: 2.5rem; height: 2.5rem; border-radius: 9999px; object-fit: cover; flex-shrink: 0; }
.vg-gi-mtxt { min-width: 0; } .vg-gi-mname { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .25rem; }
.vg-gi-msub { font-size: 11px; color: #737373; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-gi-you { font-size: 10px; color: #a3a3a3; font-weight: 600; }
.vg-gi-tag { font-size: 10px; font-weight: 700; padding: .15rem .55rem; border-radius: 9999px; background: rgba(59,130,246,.12); color: #2563eb; }
.vg-gi-tag-c { background: rgba(245,158,11,.15); color: #b45309; }
.vg-gi-more { padding: .35rem; border-radius: 9999px; color: #737373; }
.vg-gi-acts { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 0 .5rem 3.2rem; }
.vg-gi-acts button { display: inline-flex; align-items: center; gap: .35rem; font-size: 11px; font-weight: 700; padding: .35rem .8rem; border-radius: 9999px; background: rgba(128,128,128,.12); }
.vg-gi-acts button.vg-danger { color: #ef4444; }
.vg-gi-leave { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; padding: .7rem; border-radius: 1rem; color: #ef4444; font-weight: 700; font-size: 13px; background: rgba(239,68,68,.08); }

/* group call */
.vg-gc { position: relative; width: 100%; max-width: 72rem; height: min(92vh, 760px); background: #171717; border-radius: 1.5rem; overflow: hidden; border: 1px solid #262626; display: flex; flex-direction: column; color: #fff; }
.vg-gc-top { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: linear-gradient(#000c, transparent); position: absolute; inset: 0 0 auto 0; z-index: 5; pointer-events: none; }
.vg-gc-top b { font-size: 14px; } .vg-gc-top small { font-size: 11px; color: #d4d4d4; margin-left: .5rem; }
.vg-gc-timer { font-family: ui-monospace, monospace; font-size: 12px; background: #0008; padding: .2rem .65rem; border-radius: 9999px; }
.vg-gc-grid { flex: 1; display: grid; gap: .5rem; padding: 3.2rem .6rem 5.2rem; min-height: 0; grid-auto-rows: 1fr; }
.vg-gc-grid[data-n="1"] { grid-template-columns: 1fr; }
.vg-gc-grid[data-n="2"], .vg-gc-grid[data-n="3"], .vg-gc-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
.vg-gc-grid[data-n="5"], .vg-gc-grid[data-n="6"], .vg-gc-grid[data-n="7"], .vg-gc-grid[data-n="8"] { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .vg-gc-grid[data-n="2"] { grid-template-columns: 1fr; } .vg-gc-grid[data-n="5"], .vg-gc-grid[data-n="6"], .vg-gc-grid[data-n="7"], .vg-gc-grid[data-n="8"] { grid-template-columns: repeat(2, 1fr); } }
.vg-tile { position: relative; background: #0a0a0a; border-radius: 1rem; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; border: 2px solid transparent; transition: border-color .15s; }
.vg-tile.speaking { border-color: #22c55e; }
.vg-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vg-tile.audio video, .vg-tile.novideo video { opacity: 0; pointer-events: none; }
.vg-tile.self video.cam { transform: scaleX(-1); } .vg-tile.self video.screen { object-fit: contain; transform: none; }
.vg-tile .who { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: .5rem; }
.vg-tile .who img { width: 4.5rem; height: 4.5rem; border-radius: 9999px; object-fit: cover; }
.vg-tile .who span { font-size: 12px; color: #a3a3a3; }
.vg-tile.hasvideo .who { display: none; }
.vg-tile .nm { position: absolute; left: .5rem; bottom: .5rem; z-index: 2; font-size: 11px; font-weight: 600; background: #0009; padding: .15rem .55rem; border-radius: .4rem; max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-tile .st { position: absolute; right: .5rem; top: .5rem; z-index: 2; font-size: 10px; background: #f59e0bcc; color: #000; padding: .1rem .5rem; border-radius: 9999px; font-weight: 700; }
.vg-gc-wait { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #a3a3a3; font-size: 13px; text-align: center; pointer-events: none; }
.vg-gc-bar { position: absolute; inset: auto 0 0 0; z-index: 5; display: flex; justify-content: center; align-items: center; gap: .8rem; padding: 1rem; background: linear-gradient(transparent, #000d); }
.vg-gc-bar button { padding: .85rem; border-radius: 9999px; color: #fff; background: #ffffff33; backdrop-filter: blur(6px); display: inline-flex; }
.vg-gc-bar button.on { background: #ef4444; } .vg-gc-bar button.act { background: #3b82f6; }
.vg-gc-bar button.end { background: #dc2626; padding: .85rem 1.4rem; gap: .5rem; font-weight: 700; font-size: 12px; align-items: center; }
.vg-tile.self video.rear { transform: none; }
