/* EV v303 targeted fixes: instant theme, strict presence display, single chat image viewer, admin active state */
.evdm-support-status,
.evdm-support-status *,
.evdm-support-countdown,
#supportCountdown,
[data-support-countdown],
[data-ev-support-waiting],
[data-ev-support-connected]{color:#dc2626!important;font-weight:1000!important;}
html.dark .evdm-support-status,
html.dark .evdm-support-status *,
html.dark .evdm-support-countdown,
html.dark #supportCountdown,
html.dark [data-support-countdown],
html.dark [data-ev-support-waiting],
html.dark [data-ev-support-connected]{color:#f87171!important;text-shadow:0 0 14px rgba(248,113,113,.18)!important;}
.ev-escrow-presence-row,.ev-escrow-presence-stack{display:block;color:#334155!important;font-size:11px!important;line-height:1.25!important;font-weight:950;margin-top:2px;}
.ev-escrow-presence-stack{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:flex-start;}
.ev-escrow-presence-row[data-ev-presence-layout="stack"]{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:2px!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;}
.ev-presence-person{display:block!important;color:#0f172a!important;font-weight:1000!important;line-height:1.15!important;}
.ev-presence-status{display:inline-flex!important;align-items:center!important;gap:6px!important;color:#475569!important;font-weight:1000!important;line-height:1.15!important;}
.ev-escrow-presence-row.is-online,.ev-escrow-presence-row.online,.evdm-active-status.online,.ev-presence-status.online{color:#047857!important;}
.ev-escrow-presence-row.is-online .ev-presence-status,.ev-escrow-presence-row.online .ev-presence-status{color:#047857!important;}
.ev-escrow-presence-row.is-offline,.ev-escrow-presence-row.offline,.evdm-active-status.offline{color:#475569!important;}
.ev-escrow-presence-row.is-offline .ev-presence-status,.ev-escrow-presence-row.offline .ev-presence-status{color:#475569!important;}
.ev-escrow-presence-row.is-suspended,.ev-escrow-presence-row.suspended,.evdm-active-status.suspended{color:#b91c1c!important;}
.ev-escrow-presence-row.is-suspended .ev-presence-status,.ev-escrow-presence-row.suspended .ev-presence-status{color:#b91c1c!important;}
.evdm-active-status{color:#334155!important;background:#f8fafc!important;border-color:rgba(100,116,139,.35)!important;}
.evdm-active-status.online{color:#047857!important;background:#ecfdf5!important;border-color:rgba(16,185,129,.50)!important;}
.evdm-active-status.offline{color:#475569!important;background:#f1f5f9!important;border-color:rgba(100,116,139,.35)!important;}
.evdm-active-status.suspended{color:#b91c1c!important;background:#fef2f2!important;border-color:rgba(239,68,68,.42)!important;}
.evdm-presence-dot,.ev-presence-dot{display:inline-block;width:8px;height:8px;min-width:8px;border-radius:999px;background:#16a34a;margin-right:3px;vertical-align:middle;box-shadow:0 0 0 3px rgba(22,163,74,.15);}
html.dark .ev-escrow-presence-row,html.dark .ev-escrow-presence-stack{color:#cbd5e1!important;}
html.dark .ev-presence-person{color:#f8fafc!important;}
html.dark .ev-presence-status{color:#cbd5e1!important;}
html.dark .ev-escrow-presence-row.is-online .ev-presence-status,html.dark .ev-escrow-presence-row.online .ev-presence-status,html.dark .evdm-active-status.online{color:#86efac!important;}
html.dark .ev-escrow-presence-row.is-offline .ev-presence-status,html.dark .ev-escrow-presence-row.offline .ev-presence-status,html.dark .evdm-active-status.offline{color:#cbd5e1!important;}
html.dark .ev-escrow-presence-row.is-suspended .ev-presence-status,html.dark .ev-escrow-presence-row.suspended .ev-presence-status,html.dark .evdm-active-status.suspended{color:#fecaca!important;}
html.dark .evdm-active-status{background:#0f172a!important;border-color:rgba(148,163,184,.38)!important;color:#cbd5e1!important;}
html.dark .evdm-active-status.online{background:rgba(16,185,129,.18)!important;border-color:rgba(52,211,153,.55)!important;}
html.dark .evdm-active-status.suspended{background:rgba(127,29,29,.58)!important;border-color:rgba(248,113,113,.48)!important;}
html.dark .evdm-presence-dot,html.dark .ev-presence-dot{background:#86efac;box-shadow:0 0 0 3px rgba(134,239,172,.16);}
.ev-chat-jump-lock .evdm-msgs,.ev-chat-jump-lock .ev-msgs,.ev-chat-jump-lock .hvc-msgs,.ev-chat-jump-lock #chatBox{overflow-anchor:none!important;scroll-behavior:auto!important;}
.ev303-jump-hit{outline:3px solid #0ea5e9!important;outline-offset:3px!important;animation:ev303JumpPulse 1.6s ease both!important;}
@keyframes ev303JumpPulse{0%,100%{filter:none}20%,75%{filter:drop-shadow(0 0 16px rgba(14,165,233,.78));}}
#evChatMediaViewer{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(2,6,23,.94);z-index:2147483647;touch-action:none;color:#fff;}
#evChatMediaViewer.show{display:flex;}
#evChatMediaViewer .evv-stage{width:100vw;height:100dvh;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:58px 54px;}
#evChatMediaViewer img,#evChatMediaViewer video{max-width:96vw;max-height:88dvh;object-fit:contain;border-radius:12px;transform-origin:center center;will-change:transform;}
#evChatMediaViewer button{position:fixed;border:0;color:#fff;background:rgba(15,23,42,.70);font-weight:1000;z-index:2147483647;box-shadow:0 10px 30px rgba(0,0,0,.32);}
#evChatMediaViewer .evv-close{right:14px;top:calc(14px + env(safe-area-inset-top));width:44px;height:44px;border-radius:999px;font-size:28px;}
#evChatMediaViewer .evv-prev,#evChatMediaViewer .evv-next{top:50%;transform:translateY(-50%);width:50px;height:72px;border-radius:20px;font-size:46px;}
#evChatMediaViewer .evv-prev{left:10px;}#evChatMediaViewer .evv-next{right:10px;}
#evChatMediaViewer .evv-tools{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:8px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.20);border-radius:22px;padding:8px;z-index:2147483647;}
#evChatMediaViewer .evv-tools button{position:static;min-width:46px;height:42px;border-radius:14px;background:#fff;color:#0f172a;font-size:16px;}
#evChatMediaViewer .evv-help{position:fixed;left:14px;top:calc(14px + env(safe-area-inset-top));max-width:calc(100vw - 84px);border-radius:16px;background:rgba(15,23,42,.72);border:1px solid rgba(255,255,255,.18);padding:9px 12px;font-size:12px;font-weight:900;color:#fff;z-index:2147483647;}
@media(max-width:540px){#evChatMediaViewer .evv-stage{padding:54px 10px;}#evChatMediaViewer .evv-prev,#evChatMediaViewer .evv-next{width:38px;height:58px;font-size:34px;}#evChatMediaViewer .evv-help{font-size:11px;right:58px}.ev-escrow-presence-stack{gap:7px 10px}}
/* Hide any empty link-preview shells everywhere. They become visible only when real metadata exists. */
.ev-link-preview:not(.ev-preview-ready),.evdm-link-preview:not(.ev-preview-ready),[data-link-preview]:not(.ev-preview-ready){display:none!important;}
/* Admin side menu active state, same language as floating menu. */
.ev-menu-link{position:relative!important;}
.ev-menu-link.is-active,.ev-menu-link[aria-current="page"],.ev-menu-link[data-ev-active="1"]{background:rgba(14,165,233,.13)!important;border-color:rgba(14,165,233,.34)!important;color:#075985!important;box-shadow:inset 4px 0 0 #0ea5e9,0 10px 24px rgba(14,165,233,.10)!important;}
.ev-menu-link.is-active::after,.ev-menu-link[aria-current="page"]::after,.ev-menu-link[data-ev-active="1"]::after{content:"";position:absolute;right:12px;top:50%;width:7px;height:7px;border-radius:999px;background:#0ea5e9;transform:translateY(-50%);box-shadow:0 0 0 4px rgba(14,165,233,.14);}
.ev-menu-link.is-active .ev-menu-icon,.ev-menu-link[aria-current="page"] .ev-menu-icon{background:rgba(14,165,233,.18)!important;color:#0369a1!important;border-color:rgba(14,165,233,.18)!important;}
html.dark .ev-menu-link.is-active,html.dark .ev-menu-link[aria-current="page"],html.dark .ev-menu-link[data-ev-active="1"]{background:rgba(56,189,248,.15)!important;border-color:rgba(125,211,252,.34)!important;color:#e0f2fe!important;box-shadow:inset 4px 0 0 #7dd3fc,0 12px 28px rgba(14,165,233,.14)!important;}
html.dark .ev-menu-link.is-active::after,html.dark .ev-menu-link[aria-current="page"]::after,html.dark .ev-menu-link[data-ev-active="1"]::after{background:#7dd3fc;box-shadow:0 0 0 4px rgba(125,211,252,.15);}
html.dark .ev-menu-link.is-active .ev-menu-icon,html.dark .ev-menu-link[aria-current="page"] .ev-menu-icon{background:rgba(125,211,252,.16)!important;color:#e0f2fe!important;border-color:rgba(125,211,252,.20)!important;}
/* EV Quick notification badge */
.evx-command-badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:1000;display:inline-flex;align-items:center;justify-content:center;margin-left:auto;}
.evx-command-item .evx-command-label{display:flex;align-items:center;gap:8px;min-width:0;}
