/* AIVIO Brand Overrides via Nginx Injection */

/* Hide default text that might contain "Chatwoot" */
.logo-title, .brand-name {
    display: none !important;
}

/* Replace img src visually using CSS content property */
img[src*="logo"] {
    content: url("/brand-assets/aivio_logo_full.png") !important;
    max-height: 48px;
    width: auto;
}

/* Sidebar and app header override to small logo always */
aside img[src*="logo"],
nav img[src*="logo"],
.logo-container img {
    content: url("/brand-assets/aivio_logo_small.png") !important;
    max-height: 28px !important;
    width: auto !important;
}


/* If there are any inline SVGs used as logos instead of img */
svg.logo-svg {
    display: none !important;
}
.svg-logo-container {
    background-image: url("/brand-assets/aivio_logo_full.png") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    width: 150px;
    height: 40px;
}

/* Hide Captain group (top level block) */
/* Based on provided HTML, 'name=Captain' is on a div inside the li */
li:has(> [name="Captain"]),
[name="Captain"] {
    display: none !important;
}

/* Hide specific sub-items ONLY (using exact name attribute) */
li[name="Settings Custom Roles"],
li[name="Settings Sla"],
li[name="Settings Security"] {
    display: none !important;
}

/* Fallback icons and links hiding */
.i-woot-captain,
.i-lucide-shield-plus,
.i-lucide-clock-alert,
.i-lucide-shield {
    display: none !important;
}

/* Hide Copilot / AI sparkle button in conversation */
button:has(.i-ph-sparkle-fill),
.i-ph-sparkle-fill,
button:has(.i-fluent-chat-sparkle-16-regular),
[class*="i-fluent-sparkle"],
[class*="i-ph-sparkle"] {
    display: none !important;
}

/* Hide external links to Chatwoot (Changelog, Docs, Support) */
a[href*="chatwoot.com/changelog"],
a[href*="chatwoot.com/hc/user-guide"],
li:has(span.i-lucide-life-buoy) {
    display: none !important;
}

/* ===== Фильтр диалогов: вместить русские подписи (sort/status) ===== */
div.absolute.top-full.rounded-xl.p-4 {
    width: 24rem !important;
    max-width: calc(100vw - 1.5rem) !important;
    box-sizing: border-box;
}
div.absolute.top-full.rounded-xl.p-4 .absolute.select-none {
    width: 24rem !important;
    max-width: calc(100vw - 1.5rem) !important;
    box-sizing: border-box;
}
div.absolute.top-full.rounded-xl.p-4 .absolute.select-none button {
    width: 100% !important;
}
div.absolute.top-full.rounded-xl.p-4 button[class~="!w-fit"] {
    max-width: 16rem !important;
}
@media (max-width: 768px) {
    div.absolute.top-full.rounded-xl.p-4 .absolute.select-none {
        left: auto !important; right: 0 !important;
        top: 100% !important; bottom: auto !important;
        margin: .25rem 0 0 0 !important;
    }
}

/* Скрыть пункты «Упоминания» и «Участвующие» в боковом меню диалогов */
li[name="Mentions"],
li[name="Participating"],
[name="Mentions"],
[name="Participating"] {
    display: none !important;
}

/* Под-группы сайдбара (Источники/Папки/Команды/Категории): больше высоты до скролла */
[class*="max-h-[calc(14rem"] {
    max-height: calc(20rem + 16px) !important;
}

/* Колонка списка диалогов чуть шире (не трогаем развёрнутый режим basis-full) */
.conversations-list-wrap:not(.basis-full) {
    width: 400px !important;
}
@media (min-width: 1536px) {
    .conversations-list-wrap:not(.basis-full) {
        width: 460px !important;
    }
}

/* Счётчик «Неотвеченные» в сайдбаре — красный */
li.child-item a[title="Неотвеченные"] span[class*="outline-1"] {
    color: #ef4444 !important;
    outline-color: #ef4444 !important;
}
