﻿/* ===================================================================
   CONVERSATIONS UNREAD BADGE — Sidebar indicator (matches Team badge)
   Expanded:  [ 📣 Conversations          🔴 3 ]
   Collapsed: [ 📣 ] with small red "3" badge top-right
   =================================================================== */


/* ---- EXPANDED STATE (default) ---- */

.conv-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-left: auto;
    padding: 3px 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
    animation: conv-badge-in 0.25s ease-out;
}

/* Count number */
.conv-unread-count {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

@keyframes conv-badge-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* ---- COLLAPSED STATE ---- */
/* Ensure nav-item is the positioning anchor (same as Team) */
#nav-conversations {
    position: relative;
}

.layout-app.sidebar-collapsed .sidebar .conv-unread-badge {
    /* Reset expanded layout behavior */
    margin-left: 0;
    padding: 0;
    gap: 0;
    /* Badge look */
    background: #ef4444;
    border: 2px solid var(--sidebar-bg-1, #FAFAF9);
    border-radius: 999px;
    /* Position as notification badge */
    position: absolute;
    top: 2px;
    right: 2px;
    /* Compact sizing */
    min-width: 18px;
    height: 18px;
    justify-content: center;
    align-items: center;
    /* White text on red */
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    /* No extra effects needed in collapsed */
    box-shadow: none;
    animation: none;
}

/* Keep count visible in collapsed */
.layout-app.sidebar-collapsed .sidebar .conv-unread-count {
    display: inline;
}
