/* ============================================================================
   CHAT CONTACTS — PREMIUM REDESIGN
   Viviana · Soulmate Pink · Dark Premium

   Scope: ONLY #profileSelection (chat tab contact list).
   Loaded LAST in the CSS chain to cleanly supersede:
     · chat-ui-fanfix.css
     · vivid-redesign.css
     · chat-vibe.css
     · critical-ui-fix.css
     · message-notifications.css (contact-unread-badge base)

   Keeps the existing DOM structure (class names unchanged), so the
   renderer in profile-list-manager.js keeps working without edits.
   Avatar per-profile background colors (inline styles) are preserved —
   we never set `background` on .contact-avatar-img, only the ring.
   ============================================================================ */


/* ----------------------------------------------------------------------------
   Scoped tokens — never leak outside the chat tab
   ---------------------------------------------------------------------------- */
#profileSelection {
    --vc-card-radius: 22px;
    --vc-card-pad-y: 14px;
    --vc-card-pad-x: 16px;
    --vc-avatar: 56px;
    --vc-gap: 10px;

    --vc-border: rgba(255, 255, 255, 0.065);
    --vc-border-hover: rgba(233, 30, 99, 0.30);
    --vc-card-bg: linear-gradient(135deg,
                    rgba(255, 255, 255, 0.045) 0%,
                    rgba(233, 30, 99, 0.022) 100%);
    --vc-card-bg-hover: linear-gradient(135deg,
                    rgba(255, 255, 255, 0.075) 0%,
                    rgba(233, 30, 99, 0.042) 100%);
    --vc-card-bg-unread: linear-gradient(135deg,
                    rgba(233, 30, 99, 0.125) 0%,
                    rgba(233, 30, 99, 0.04) 100%);

    --vc-pink: #E91E63;
    --vc-pink-light: #FF4081;
    --vc-pink-soft: #FF80AB;
    --vc-accent-gradient: linear-gradient(135deg, #FF4081 0%, #E91E63 55%, #C2185B 100%);
    --vc-ring-gradient: linear-gradient(140deg, #FF80AB 0%, #E91E63 50%, #9C27B0 100%);

    --vc-online: #4ade80;
    --vc-online-bright: #86f4a6;
    --vc-online-deep: #16a34a;

    --vc-ease-spring: cubic-bezier(0.2, 0.9, 0.3, 1.25);
    --vc-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ============================================================================
   HERO HEADER  —  bigger, softer, ambient pink halo
   ============================================================================ */

#profileSelection .messages-header {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    padding: 26px 22px 18px !important;
    padding-top: calc(26px + env(safe-area-inset-top, 0px)) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: 3 !important;
}

/* Soft pink halo glowing behind the title — ambient depth */
#profileSelection .messages-header::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -12%;
    width: 124%;
    height: 220px;
    background: radial-gradient(ellipse at 50% 40%,
                    rgba(233, 30, 99, 0.22) 0%,
                    rgba(233, 30, 99, 0.08) 28%,
                    transparent 62%);
    filter: blur(2px);
    pointer-events: none;
    z-index: -1;
}

/* Subtle divider line below header — thin gradient */
#profileSelection .messages-header::after {
    content: '' !important;
    position: absolute !important;
    left: 22px !important;
    right: 22px !important;
    bottom: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg,
                    transparent 0%,
                    rgba(233, 30, 99, 0.30) 22%,
                    rgba(156, 39, 176, 0.18) 55%,
                    rgba(233, 30, 99, 0.18) 78%,
                    transparent 100%) !important;
    display: block !important;
    top: auto !important;
}

#profileSelection .messages-header h1 {
    font-size: 32px !important;
    font-weight: 800 !important;
    letter-spacing: -0.8px !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 55%, #FF80AB 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
}


/* ============================================================================
   LIST CONTAINER
   ============================================================================ */

#profileSelection .contact-list {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    background: transparent !important;
    padding: 14px 14px calc(var(--nav-height, 65px) + 32px) !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    scrollbar-width: none;
}

#profileSelection .contact-list::-webkit-scrollbar {
    display: none;
}


/* ============================================================================
   SWIPE WRAPPER  —  keeps swipe-to-delete working, adds entry animation
   ============================================================================ */

#profileSelection .swipe-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--vc-card-radius) !important;
    margin-bottom: 0 !important;
    touch-action: pan-y;
    isolation: isolate;
    animation: vcCardIn 0.5s var(--vc-ease-spring) both;

    /* Prevent flex from compressing contact cards — .contact-list is a flex
       column and without these the cards would shrink below their natural
       height (clipping the inner .contact-item via overflow: hidden) and
       the list would never overflow → scroll would never activate. */
    flex-shrink: 0 !important;
    min-height: 82px !important;
}

/* Staggered fade-in for the first several cards */
#profileSelection .contact-list > .swipe-container:nth-child(1) { animation-delay: 0.02s; }
#profileSelection .contact-list > .swipe-container:nth-child(2) { animation-delay: 0.06s; }
#profileSelection .contact-list > .swipe-container:nth-child(3) { animation-delay: 0.10s; }
#profileSelection .contact-list > .swipe-container:nth-child(4) { animation-delay: 0.14s; }
#profileSelection .contact-list > .swipe-container:nth-child(5) { animation-delay: 0.18s; }
#profileSelection .contact-list > .swipe-container:nth-child(6) { animation-delay: 0.22s; }
#profileSelection .contact-list > .swipe-container:nth-child(n+7) { animation-delay: 0.26s; }

@keyframes vcCardIn {
    0%   { opacity: 0; transform: translateY(14px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Red delete action zone behind swipe — matches new radius */
#profileSelection .swipe-actions-bg {
    border-radius: 0 var(--vc-card-radius) var(--vc-card-radius) 0 !important;
    background: linear-gradient(135deg, #ff3b30 0%, #c0392b 100%) !important;
}


/* ============================================================================
   CONTACT CARD
   ============================================================================ */

#profileSelection .contact-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: var(--vc-card-pad-y) var(--vc-card-pad-x) !important;
    min-height: 82px !important;
    background: var(--vc-card-bg) !important;
    border: 1px solid var(--vc-border) !important;
    border-bottom: 1px solid var(--vc-border) !important;
    border-radius: var(--vc-card-radius) !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.035) inset,
        0 6px 20px rgba(0, 0, 0, 0.28) !important;
    transition:
        transform 0.28s var(--vc-ease-spring),
        border-color 0.25s var(--vc-ease-out),
        background 0.28s var(--vc-ease-out),
        box-shadow 0.32s var(--vc-ease-out) !important;
}

/* Accent bar on the left edge — appears on hover / unread */
#profileSelection .contact-item::before {
    content: '';
    position: absolute;
    top: 16%;
    bottom: 16%;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--vc-accent-gradient);
    box-shadow: 0 0 12px rgba(233, 30, 99, 0.55);
    opacity: 0;
    transform: translateX(-3px);
    transition:
        opacity 0.3s var(--vc-ease-out),
        transform 0.35s var(--vc-ease-spring);
    pointer-events: none;
}

/* Soft radial gradient wash on hover — premium “glow” */
#profileSelection .contact-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 0% 50%,
                    rgba(233, 30, 99, 0.10) 0%,
                    transparent 55%);
    opacity: 0;
    transition: opacity 0.35s var(--vc-ease-out);
    pointer-events: none;
}

@media (hover: hover) {
    #profileSelection .contact-item:hover {
        background: var(--vc-card-bg-hover) !important;
        border-color: var(--vc-border-hover) !important;
        transform: translateY(-2px) !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.08) inset,
            0 16px 42px rgba(0, 0, 0, 0.48),
            0 0 0 1px rgba(233, 30, 99, 0.18),
            0 0 36px rgba(233, 30, 99, 0.20) !important;
    }
    #profileSelection .contact-item:hover::before {
        opacity: 1;
        transform: translateX(0);
    }
    #profileSelection .contact-item:hover::after {
        opacity: 1;
    }
}

#profileSelection .contact-item:active {
    transform: scale(0.985) !important;
    background: linear-gradient(135deg,
                    rgba(233, 30, 99, 0.10) 0%,
                    rgba(233, 30, 99, 0.03) 100%) !important;
    border-color: rgba(233, 30, 99, 0.38) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 4px 14px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(233, 30, 99, 0.28) !important;
}


/* ============================================================================
   UNREAD STATE  —  card with .contact-unread-badge gets extra prominence
   Uses :has() (supported in all modern evergreen browsers).
   ============================================================================ */

#profileSelection .contact-item:has(.contact-unread-badge) {
    background: var(--vc-card-bg-unread) !important;
    border-color: rgba(233, 30, 99, 0.28) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 24px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(233, 30, 99, 0.20),
        0 0 28px rgba(233, 30, 99, 0.14) !important;
}

#profileSelection .contact-item:has(.contact-unread-badge)::before {
    opacity: 1;
    transform: translateX(0);
    width: 3px;
}

#profileSelection .contact-item:has(.contact-unread-badge) .contact-name h3 {
    color: #ffffff !important;
}

#profileSelection .contact-item:has(.contact-unread-badge) .contact-preview {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600 !important;
}

#profileSelection .contact-item:has(.contact-unread-badge) .contact-time {
    color: var(--vc-pink-light) !important;
    font-weight: 600 !important;
}


/* ============================================================================
   LOCKED STATE  —  quiz not yet completed (no .contact-verified)
   ============================================================================ */

#profileSelection .contact-item:not(:has(.contact-verified)) {
    background: linear-gradient(135deg,
                    rgba(255, 255, 255, 0.028) 0%,
                    rgba(255, 255, 255, 0.015) 100%) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.025) inset,
        0 4px 14px rgba(0, 0, 0, 0.22) !important;
}

#profileSelection .contact-item:not(:has(.contact-verified)) .contact-avatar {
    background: linear-gradient(140deg,
                    rgba(255, 128, 171, 0.55) 0%,
                    rgba(233, 30, 99, 0.55) 50%,
                    rgba(156, 39, 176, 0.55) 100%) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 4px 14px rgba(0, 0, 0, 0.32) !important;
}

#profileSelection .contact-item:not(:has(.contact-verified)) .contact-name h3 {
    color: rgba(255, 255, 255, 0.78) !important;
}

#profileSelection .contact-item:not(:has(.contact-verified)) .contact-preview {
    color: rgba(255, 255, 255, 0.42) !important;
}


/* ============================================================================
   AVATAR  —  elegant gradient ring, preserves per-profile inline color
   ============================================================================ */

#profileSelection .contact-avatar {
    position: relative !important;
    flex-shrink: 0 !important;
    width: var(--vc-avatar);
    height: var(--vc-avatar);
    padding: 2px;
    border-radius: 50%;
    background: var(--vc-ring-gradient);
    box-shadow:
        0 0 0 1px rgba(233, 30, 99, 0.22),
        0 6px 22px rgba(233, 30, 99, 0.22),
        0 2px 10px rgba(0, 0, 0, 0.35);
    transition:
        box-shadow 0.32s var(--vc-ease-out),
        transform 0.32s var(--vc-ease-spring);
}

#profileSelection .contact-item:hover .contact-avatar {
    transform: scale(1.035);
    box-shadow:
        0 0 0 1.5px rgba(233, 30, 99, 0.45),
        0 12px 30px rgba(233, 30, 99, 0.38),
        0 4px 16px rgba(0, 0, 0, 0.48);
}

/* IMPORTANT: do NOT set `background` on the image element —
   inline style from JS supplies the per-profile color/gradient. */
#profileSelection .contact-avatar-img {
    width: 100% !important;
    height: 100% !important;
    min-width: auto !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    border: 2px solid #0C0810 !important;
    background-clip: padding-box !important;
    box-shadow: none !important;
}

#profileSelection .contact-avatar-img .avatar-img-layer,
#profileSelection .contact-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


/* ============================================================================
   ONLINE DOT  —  refined, less harsh, soft pulse
   ============================================================================ */

#profileSelection .contact-online-dot {
    position: absolute !important;
    bottom: 1px !important;
    right: 1px !important;
    top: auto !important;
    left: auto !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 32% 32%,
                    #86f4a6 0%, #4ade80 45%, #16a34a 100%) !important;
    border: 2.5px solid #0C0810 !important;
    box-shadow:
        0 0 0 1.5px rgba(74, 222, 128, 0.40),
        0 0 10px rgba(74, 222, 128, 0.40) !important;
    animation: vcOnlinePulse 2.8s ease-in-out infinite !important;
    z-index: 2;
}

@keyframes vcOnlinePulse {
    0%, 100% {
        box-shadow:
            0 0 0 1.5px rgba(74, 222, 128, 0.36),
            0 0 8px rgba(74, 222, 128, 0.36);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(74, 222, 128, 0.18),
            0 0 14px rgba(74, 222, 128, 0.60);
    }
}


/* ============================================================================
   TEXT COLUMN  —  name, verified badge, preview
   ============================================================================ */

#profileSelection .contact-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
    padding-right: 6px;
}

#profileSelection .contact-name {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
    min-width: 0;
}

#profileSelection .contact-name h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    letter-spacing: -0.2px !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

/* Verified becomes a tiny gradient coin with a check inside —
   more premium than the raw character. The JS still renders "✓". */
#profileSelection .contact-verified {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: var(--vc-accent-gradient) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    box-shadow:
        0 2px 6px rgba(233, 30, 99, 0.45),
        0 0 0 1.5px rgba(12, 8, 16, 0.4);
}

#profileSelection .contact-preview {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.54) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: 0.05px;
}


/* ============================================================================
   META COLUMN  —  time + unread badge
   ============================================================================ */

#profileSelection .contact-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin-left: 4px;
    min-height: var(--vc-avatar);
    text-align: right !important;
}

#profileSelection .contact-time {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.42) !important;
    letter-spacing: 0.15px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#profileSelection .contact-unread-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 7px !important;
    border-radius: 11px !important;
    background: var(--vc-accent-gradient) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin: 0 !important;
    letter-spacing: 0.2px;
    box-shadow:
        0 4px 14px rgba(233, 30, 99, 0.45),
        0 0 0 2px rgba(233, 30, 99, 0.15) !important;
    animation: vcBadgePop 0.55s var(--vc-ease-spring) both;
}

@keyframes vcBadgePop {
    0%   { transform: scale(0.55); opacity: 0; }
    60%  { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
}


/* ============================================================================
   EMPTY STATE  —  warmer, inviting
   ============================================================================ */

#profileSelection .chats-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 68px 32px 40px !important;
    text-align: center;
    gap: 14px;
    position: relative;
}

#profileSelection .chats-empty-state::before {
    content: '';
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle,
                    rgba(233, 30, 99, 0.14) 0%,
                    transparent 65%);
    pointer-events: none;
    z-index: -1;
}

#profileSelection .chats-empty-icon {
    width: 88px !important;
    height: 88px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 42px !important;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), transparent 70%),
        linear-gradient(135deg, rgba(233, 30, 99, 0.20) 0%, rgba(156, 39, 176, 0.14) 100%);
    border: 1px solid rgba(233, 30, 99, 0.30);
    box-shadow:
        0 10px 44px rgba(233, 30, 99, 0.28),
        0 0 0 4px rgba(233, 30, 99, 0.06);
    margin-bottom: 8px;
    animation: vcHeartBreathe 3.4s ease-in-out infinite;
}

@keyframes vcHeartBreathe {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 10px 44px rgba(233, 30, 99, 0.28),
            0 0 0 4px rgba(233, 30, 99, 0.06);
    }
    50% {
        transform: scale(1.045);
        box-shadow:
            0 14px 56px rgba(233, 30, 99, 0.42),
            0 0 0 8px rgba(233, 30, 99, 0.10);
    }
}

#profileSelection .chats-empty-title {
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#profileSelection .chats-empty-sub {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    max-width: 300px;
}


/* ============================================================================
   LOADING STATE
   ============================================================================ */

#profileSelection .chats-loading-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px 20px !important;
    gap: 18px;
}

#profileSelection .loading-bounce-dots {
    display: flex;
    gap: 8px;
}

#profileSelection .loading-bounce-dots .bounce-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--vc-accent-gradient);
    box-shadow: 0 2px 10px rgba(233, 30, 99, 0.48);
    animation: vcBounce 1.15s ease-in-out infinite;
}
#profileSelection .loading-bounce-dots .bounce-dot:nth-child(2) { animation-delay: 0.15s; }
#profileSelection .loading-bounce-dots .bounce-dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes vcBounce {
    0%, 80%, 100% { transform: translateY(0);    opacity: 0.5; }
    40%            { transform: translateY(-10px); opacity: 1;   }
}

#profileSelection .loading-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 500;
    letter-spacing: 0.3px;
    margin: 0;
}


/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 480px) {
    #profileSelection {
        --vc-avatar: 52px;
        --vc-card-radius: 20px;
    }
    #profileSelection .messages-header {
        padding: 22px 18px 16px !important;
        padding-top: calc(22px + env(safe-area-inset-top, 0px)) !important;
    }
    #profileSelection .messages-header h1 {
        font-size: 28px !important;
    }
    #profileSelection .contact-list {
        padding: 12px 12px calc(var(--nav-height, 65px) + 24px) !important;
        gap: 7px !important;
    }
    #profileSelection .contact-item {
        min-height: 78px !important;
        padding: 12px 14px !important;
        gap: 12px !important;
    }
    #profileSelection .contact-name h3 {
        font-size: 15.5px !important;
    }
    #profileSelection .contact-preview {
        font-size: 12.5px !important;
    }
}

@media (min-width: 768px) {
    #profileSelection .contact-list {
        padding: 16px 20px calc(var(--nav-height, 65px) + 40px) !important;
        gap: 10px !important;
    }
    #profileSelection .contact-item {
        padding: 16px 18px !important;
        min-height: 86px !important;
    }
}


/* ============================================================================
   REDUCED MOTION  —  respect user preference
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    #profileSelection .swipe-container,
    #profileSelection .contact-unread-badge,
    #profileSelection .contact-online-dot,
    #profileSelection .chats-empty-icon,
    #profileSelection .loading-bounce-dots .bounce-dot {
        animation: none !important;
    }
    #profileSelection .contact-item,
    #profileSelection .contact-avatar {
        transition: none !important;
    }
}


/* ============================================================================
   LIGHT THEME  —  keep the redesign cohesive on light mode
   ============================================================================ */

[data-theme="light"] #profileSelection {
    --vc-border: rgba(0, 0, 0, 0.06);
    --vc-border-hover: rgba(233, 30, 99, 0.28);
    --vc-card-bg: linear-gradient(135deg,
                    rgba(255, 255, 255, 0.96) 0%,
                    rgba(255, 244, 248, 0.96) 100%);
    --vc-card-bg-hover: linear-gradient(135deg,
                    rgba(255, 255, 255, 1) 0%,
                    rgba(255, 232, 240, 1) 100%);
    --vc-card-bg-unread: linear-gradient(135deg,
                    rgba(255, 240, 246, 1) 0%,
                    rgba(255, 220, 232, 1) 100%);
}

[data-theme="light"] #profileSelection .messages-header::before {
    background: radial-gradient(ellipse at 50% 40%,
                    rgba(233, 30, 99, 0.12) 0%,
                    rgba(233, 30, 99, 0.04) 28%,
                    transparent 62%);
}

[data-theme="light"] #profileSelection .messages-header h1 {
    background: linear-gradient(135deg, #2D1F24 0%, #E91E63 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

[data-theme="light"] #profileSelection .contact-item {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 6px 18px rgba(233, 30, 99, 0.08) !important;
}

[data-theme="light"] #profileSelection .contact-item:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 14px 34px rgba(233, 30, 99, 0.14),
        0 0 0 1px rgba(233, 30, 99, 0.22) !important;
}

[data-theme="light"] #profileSelection .contact-item:has(.contact-unread-badge) {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 8px 22px rgba(233, 30, 99, 0.18),
        0 0 0 1px rgba(233, 30, 99, 0.22) !important;
}

[data-theme="light"] #profileSelection .contact-name h3 {
    color: #1a1a1a !important;
}

[data-theme="light"] #profileSelection .contact-item:has(.contact-unread-badge) .contact-name h3 {
    color: #1a1a1a !important;
}

[data-theme="light"] #profileSelection .contact-preview {
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-theme="light"] #profileSelection .contact-item:has(.contact-unread-badge) .contact-preview {
    color: rgba(0, 0, 0, 0.82) !important;
}

[data-theme="light"] #profileSelection .contact-time {
    color: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="light"] #profileSelection .contact-avatar-img {
    border: 2px solid #ffffff !important;
}

[data-theme="light"] #profileSelection .contact-online-dot {
    border-color: #ffffff !important;
}

[data-theme="light"] #profileSelection .chats-empty-title {
    background: linear-gradient(135deg, #1a1a1a 0%, #E91E63 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] #profileSelection .chats-empty-sub {
    color: rgba(0, 0, 0, 0.55) !important;
}


/* ════════════════════════════════════════════════════════════════════
   PROFILE CARD MODAL — PREMIUM REDESIGN
   ────────────────────────────────────────────────────────────────────
   Target: #profileCardModal (used by openProfileCard() for BOTH
           AI personas and real user profiles).
   Scope:  Only visual upgrade — identical DOM, identical content,
           identical classes. No new elements added.
   Cascade: This file loads LAST in index.html, so it cleanly overrides
            .pc-* rules in chat-ui-fanfix.css.
   ════════════════════════════════════════════════════════════════════ */

.profile-card-overlay {
    --pc-base: #0b080d;
    --pc-elev: rgba(255, 255, 255, 0.04);
    --pc-border: rgba(255, 255, 255, 0.085);
    --pc-pink: #E91E63;
    --pc-pink-light: #FF4081;
    --pc-pink-soft: #FF80AB;
    --pc-pink-deep: #C2185B;
    --pc-purple: #9C27B0;
    --pc-text: #ffffff;
    --pc-text-s: rgba(255, 255, 255, 0.68);
    --pc-text-m: rgba(255, 255, 255, 0.44);
    --pc-accent-grad: linear-gradient(135deg, #FF4081 0%, #E91E63 50%, #C2185B 100%);
    --pc-header-grad: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 45%, #FF80AB 100%);
    background: var(--pc-base) !important;
}

/* ── Sheet shell: cinematic inner frame ─────────────────────── */
.profile-card-overlay .profile-card-sheet {
    background: var(--pc-base) !important;
    position: relative;
    isolation: isolate;
}
.profile-card-overlay .profile-card-sheet::before {
    /* Warm ambient halo bleeding down from the cover into the body */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 62%;
    background:
        radial-gradient(ellipse at 62% 0%, rgba(233, 30, 99, 0.24), transparent 62%),
        radial-gradient(ellipse at 18% 34%, rgba(156, 39, 176, 0.14), transparent 58%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
}

/* ── Topbar: floating glass back button ─────────────────────── */
.profile-card-overlay .pc-topbar {
    padding: 14px 18px 12px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    height: auto;
    background: linear-gradient(180deg,
        rgba(11, 8, 13, 0.5) 0%,
        rgba(11, 8, 13, 0.18) 55%,
        transparent 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 25;
}

.profile-card-overlay .pc-topbar-back {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 10, 20, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 8px 26px rgba(0, 0, 0, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 0 0 1px rgba(233, 30, 99, 0.05);
    color: #ffffff;
    transition: transform 0.18s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.profile-card-overlay .pc-topbar-back:hover {
    border-color: rgba(233, 30, 99, 0.42) !important;
    background: rgba(22, 12, 28, 0.72) !important;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 0 0 1px rgba(233, 30, 99, 0.25);
}
.profile-card-overlay .pc-topbar-back:active {
    transform: scale(0.92);
}

/* ── Scroll area ─────────────────────────────────────────────── */
.profile-card-overlay .profile-card-scroll {
    position: relative;
    z-index: 1;
}

/* ── Hero cover: cinematic, immersive, premium ──────────────── */
.profile-card-overlay .pc-cover {
    height: 58vh;
    min-height: 360px;
    max-height: 520px;
    background: linear-gradient(160deg, #1f0f2c 0%, #140a1a 65%, #0b080d 100%);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    flex-shrink: 0;
}

/* Warm pink vignette behind the name area (no new DOM — just glow) */
.profile-card-overlay .pc-cover::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70%;
    background:
        radial-gradient(ellipse 85% 100% at 12% 98%, rgba(233, 30, 99, 0.46), transparent 62%),
        radial-gradient(ellipse 60% 72% at 82% 92%, rgba(156, 39, 176, 0.26), transparent 60%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

.profile-card-overlay .pc-cover-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Richer multi-stop dark blend that melts into the body */
.profile-card-overlay .pc-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(11, 8, 13, 0.38) 0%,
        rgba(11, 8, 13, 0.00) 18%,
        rgba(11, 8, 13, 0.00) 42%,
        rgba(11, 8, 13, 0.22) 58%,
        rgba(11, 8, 13, 0.58) 72%,
        rgba(11, 8, 13, 0.90) 86%,
        var(--pc-base) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Cover info — more breathing room */
.profile-card-overlay .pc-cover-info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0 26px 28px;
    z-index: 3;
    pointer-events: none;
}

/* Name — luxurious gradient typography */
.profile-card-overlay .pc-name {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.02;
    margin: 0 0 8px;
    color: transparent !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 45%, #FF80AB 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.75);
    filter: drop-shadow(0 4px 18px rgba(255, 64, 129, 0.32));
}

/* Subtitle — refined secondary with a warmer tint */
.profile-card-overlay .pc-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.1px;
    margin: 0;
    max-width: 92%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ── Body: premium spacing ──────────────────────────────────── */
.profile-card-overlay .pc-body {
    padding: 26px 22px 140px;
    position: relative;
    z-index: 1;
}

.profile-card-overlay .pc-section {
    margin-bottom: 22px;
}
.profile-card-overlay .pc-section:last-child {
    margin-bottom: 0;
}

/* Section title — pink accent with gradient divider */
.profile-card-overlay .pc-section-title {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--pc-pink-soft) !important;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-card-overlay .pc-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(233, 30, 99, 0.38) 0%,
        rgba(233, 30, 99, 0.08) 55%,
        transparent 100%);
}

/* Bio — premium glass card */
.profile-card-overlay .pc-bio {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.84);
    margin: 0;
    padding: 18px 20px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.022) 100%),
        linear-gradient(135deg, rgba(233, 30, 99, 0.065) 0%, rgba(156, 39, 176, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.085);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.055) inset,
        0 10px 34px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(233, 30, 99, 0.04);
    position: relative;
    overflow: hidden;
}
.profile-card-overlay .pc-bio::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 128, 171, 0.42), transparent);
}

/* Tags — premium glass chips */
.profile-card-overlay .pc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.profile-card-overlay .pc-tag {
    padding: 10px 16px;
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.022)),
        linear-gradient(135deg, rgba(233, 30, 99, 0.14), rgba(156, 39, 176, 0.07));
    border: 1px solid rgba(233, 30, 99, 0.26) !important;
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.085) inset,
        0 4px 14px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(233, 30, 99, 0.05);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.profile-card-overlay .pc-tag:hover {
    border-color: rgba(233, 30, 99, 0.42) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 6px 18px rgba(233, 30, 99, 0.22),
        0 0 0 1px rgba(233, 30, 99, 0.18);
}
.profile-card-overlay .pc-tag:active {
    transform: translateY(1px);
}

/* Stats — premium gradient tiles with inner glow */
.profile-card-overlay .pc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}
.profile-card-overlay .pc-stat {
    padding: 18px 12px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(135deg, rgba(233, 30, 99, 0.055) 0%, rgba(156, 39, 176, 0.025) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.085) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.065) inset,
        0 8px 26px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(233, 30, 99, 0.045);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.profile-card-overlay .pc-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 128, 171, 0.55), transparent);
}
.profile-card-overlay .pc-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.4px;
    color: transparent !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 40%, #FF80AB 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(255, 64, 129, 0.24));
}
.profile-card-overlay .pc-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ── Action bar: floating glass ledge ───────────────────────── */
.profile-card-overlay .pc-action-bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(11, 8, 13, 0.82) 40%,
        var(--pc-base) 72%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 4;
}

/* Action button: taller, richer, multi-layer glow + shimmer */
.profile-card-overlay .pc-action-btn {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 20px;
    background:
        linear-gradient(135deg, #FF4081 0%, #E91E63 50%, #C2185B 100%) !important;
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 14px 40px rgba(233, 30, 99, 0.54),
        0 4px 16px rgba(233, 30, 99, 0.32),
        0 0 0 1px rgba(233, 30, 99, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.24) inset,
        0 -10px 22px rgba(194, 24, 91, 0.35) inset;
    transition: transform 0.18s ease, box-shadow 0.22s ease;
}
.profile-card-overlay .pc-action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}
.profile-card-overlay .pc-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 32%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 68%);
    transform: translateX(-100%);
    pointer-events: none;
    animation: pcBtnShimmer 5s ease-in-out infinite;
}
@keyframes pcBtnShimmer {
    0%, 72%, 100% { transform: translateX(-100%); }
    82%, 92%      { transform: translateX(100%); }
}
.profile-card-overlay .pc-action-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 18px 48px rgba(233, 30, 99, 0.6),
        0 6px 18px rgba(233, 30, 99, 0.38),
        0 0 0 1px rgba(233, 30, 99, 0.44),
        0 1px 0 rgba(255, 255, 255, 0.28) inset,
        0 -10px 24px rgba(194, 24, 91, 0.4) inset;
}
.profile-card-overlay .pc-action-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 6px 20px rgba(233, 30, 99, 0.44),
        0 1px 0 rgba(255, 255, 255, 0.22) inset;
}
.profile-card-overlay .pc-action-btn:disabled,
.profile-card-overlay .pc-action-btn[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.3);
}
.profile-card-overlay .pc-action-btn:disabled::after,
.profile-card-overlay .pc-action-btn[disabled]::after {
    display: none;
}

/* ── Light theme adaptation ─────────────────────────────────── */
[data-theme="light"] .profile-card-overlay {
    --pc-base: #faf7f9;
    --pc-text-s: rgba(0, 0, 0, 0.68);
    --pc-text-m: rgba(0, 0, 0, 0.46);
    background: var(--pc-base) !important;
}
[data-theme="light"] .profile-card-overlay .profile-card-sheet {
    background: var(--pc-base) !important;
}
[data-theme="light"] .profile-card-overlay .profile-card-sheet::before {
    background: radial-gradient(ellipse at 62% 0%, rgba(233, 30, 99, 0.14), transparent 62%);
    opacity: 1;
}
[data-theme="light"] .profile-card-overlay .pc-cover {
    background: linear-gradient(160deg, #f7e9f0 0%, #faf7f9 100%);
}
[data-theme="light"] .profile-card-overlay .pc-cover-gradient {
    background: linear-gradient(180deg,
        rgba(250, 247, 249, 0.2) 0%,
        rgba(250, 247, 249, 0.0) 22%,
        rgba(250, 247, 249, 0.0) 44%,
        rgba(250, 247, 249, 0.25) 60%,
        rgba(250, 247, 249, 0.6) 74%,
        rgba(250, 247, 249, 0.9) 88%,
        var(--pc-base) 100%);
}
[data-theme="light"] .profile-card-overlay .pc-bio {
    color: rgba(0, 0, 0, 0.8);
    background:
        linear-gradient(180deg, #ffffff 0%, #fff8fb 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 30px rgba(233, 30, 99, 0.08);
}
[data-theme="light"] .profile-card-overlay .pc-tag {
    background:
        linear-gradient(135deg, #ffffff, #fff4f8) !important;
    border-color: rgba(233, 30, 99, 0.26) !important;
    color: rgba(0, 0, 0, 0.8) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 4px 14px rgba(233, 30, 99, 0.08);
}
[data-theme="light"] .profile-card-overlay .pc-stat {
    background:
        linear-gradient(180deg, #ffffff, #fff8fa) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 8px 24px rgba(233, 30, 99, 0.08);
}
[data-theme="light"] .profile-card-overlay .pc-stat-label {
    color: rgba(0, 0, 0, 0.46) !important;
}
[data-theme="light"] .profile-card-overlay .pc-action-bar {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(250, 247, 249, 0.82) 40%,
        var(--pc-base) 72%);
}
[data-theme="light"] .profile-card-overlay .pc-topbar-back {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #1a0f1a;
    box-shadow:
        0 8px 26px rgba(0, 0, 0, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

/* ── RTL support ────────────────────────────────────────────── */
body.rtl .profile-card-overlay .pc-section-title::after {
    background: linear-gradient(270deg,
        rgba(233, 30, 99, 0.38) 0%,
        rgba(233, 30, 99, 0.08) 55%,
        transparent 100%);
}
body.rtl .profile-card-overlay .pc-cover::after {
    background:
        radial-gradient(ellipse 85% 100% at 88% 98%, rgba(233, 30, 99, 0.46), transparent 62%),
        radial-gradient(ellipse 60% 72% at 18% 92%, rgba(156, 39, 176, 0.26), transparent 60%);
}

/* ── Narrow-device guard: shrink hero a touch on very short screens ── */
@media (max-height: 700px) {
    .profile-card-overlay .pc-cover {
        height: 50vh;
        min-height: 300px;
    }
    .profile-card-overlay .pc-name { font-size: 30px; }
    .profile-card-overlay .pc-body { padding-top: 22px; padding-bottom: 130px; }
}

/* ============================================================================
   COUNTRY FLAG — consistent emoji rendering across the UI
   ============================================================================
   Goal: wherever we show a user's country flag next to a name, the emoji
   must render cleanly at a legible size, never clip, never drift off the
   baseline, and never force a line break.
   Emoji fonts are prepended so Apple/Win/Linux all show a color flag. */

.contact-country-flag,
.profile-card-overlay .pc-name .contact-country-flag,
.persona-card__name .contact-country-flag,
.chat-hdr-name .contact-country-flag {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    margin-left: 4px;
    font-size: 0.95em;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
                 "Noto Color Emoji", "Twemoji Mozilla", "EmojiOne Color",
                 "Android Emoji", sans-serif;
    /* Emoji must keep their native color rendering even when the parent
       headline uses a gradient text-clip (which would otherwise hide
       the flag). Reset every inherited text-fill / clip property. */
    -webkit-text-fill-color: initial !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: initial !important;
    filter: none;
    text-shadow: none;
}

#profileSelection .contact-name h3 .contact-country-flag {
    font-size: 0.9em;
    margin-left: 5px;
}

.profile-card-overlay .pc-name .contact-country-flag {
    font-size: 0.7em;
    margin-left: 8px;
    vertical-align: 0.12em;
}

.persona-card__name .contact-country-flag {
    font-size: 0.85em;
    margin-left: 6px;
}

.chat-hdr-name {
    /* Allow the flag emoji to sit inline with the name without clipping */
    overflow: visible;
}

.chat-hdr-name .contact-country-flag {
    font-size: 0.95em;
    margin-left: 5px;
}
