/* icons.css — значки разделов VestochkaPost (чат «Иконки», 15.10.2026).
   Картинки лежат в static/icons/. Файл подключается в base.html сразу после style.css.
   Чтобы вернуть эмодзи, достаточно убрать строку подключения из base.html. */

/* ---------- нижнее меню на телефоне: картинка вместо эмодзи ---------- */
.tabbar>a[href="/"] .ti,
.tabbar>a[href="/chats"] .ti,
.tabbar>a[href="/team"] .ti,
.tabbar>a[href="/team/tasks"] .ti,
.tabbar>a[href="/dashboard"] .ti,
.tabbar>a[href="/docs"] .ti {
  font-size: 0; color: transparent;
  display: block; width: 24px; height: 24px; margin: 0 auto;
  background: center / contain no-repeat;
}
.tabbar>a[href="/"] .ti { background-image: url(icons/zakazy.png); }
.tabbar>a[href="/chats"] .ti { background-image: url(icons/chaty.png); }
.tabbar>a[href="/team"] .ti { background-image: url(icons/komanda.png); }
.tabbar>a[href="/team/tasks"] .ti { background-image: url(icons/zadachi.png); }
.tabbar>a[href="/dashboard"] .ti { background-image: url(icons/svodka.png); }
.tabbar>a[href="/docs"] .ti { background-image: url(icons/dokumenty.png); }

/* ---------- меню «Ещё» на телефоне ---------- */
.tabbar .sheet a[href="/settings"]::before,
.tabbar .sheet a[href="/aihelp"]::before,
.tabbar .sheet a[href="/stickers"]::before,
.tabbar .sheet a[href="/replies"]::before,
.tabbar .sheet a[href="/chatbg"]::before,
.tabbar .sheet a[href="/profile"]::before {
  content: ""; display: inline-block; width: 20px; height: 20px;
  margin-right: 8px; vertical-align: -5px;
  background: center / contain no-repeat;
}
.tabbar .sheet a[href="/settings"]::before,
.tabbar .sheet a[href="/aihelp"]::before { background-image: url(icons/gear.png); }
.tabbar .sheet a[href="/stickers"]::before { background-image: url(icons/stikery.png); }
.tabbar .sheet a[href="/replies"]::before { background-image: url(icons/bystrye-otvety.png); }
.tabbar .sheet a[href="/chatbg"]::before { background-image: url(icons/fon-chatov.png); }
.tabbar .sheet a[href="/profile"]::before { background-image: url(icons/profil.png); }

/* ---------- верхнее меню (тёмная шапка): белые контурные значки перед названием ---------- */
header.top nav a[href="/"]::before,
header.top nav a[href="/chats"]::before,
header.top nav a[href="/team"]::before,
header.top nav a[href="/team/tasks"]::before,
header.top nav a[href="/dashboard"]::before,
header.top nav a[href="/docs"]::before,
header.top nav a[href="/settings"]::before,
header.top nav a[href="/aihelp"]::before {
  content: ""; display: inline-block; width: 17px; height: 17px;
  margin-right: 6px; vertical-align: -3px;
  background: center / contain no-repeat;
  opacity: .8;
}
header.top nav a.on::before { opacity: 1; }
header.top nav a[href="/"]::before { background-image: url(icons/zakazy-w.png); }
header.top nav a[href="/chats"]::before { background-image: url(icons/chaty-w.png); }
header.top nav a[href="/team"]::before { background-image: url(icons/komanda-w.png); }
header.top nav a[href="/team/tasks"]::before { background-image: url(icons/zadachi-w.png); }
header.top nav a[href="/dashboard"]::before { background-image: url(icons/svodka-w.png); }
header.top nav a[href="/docs"]::before { background-image: url(icons/dokumenty-w.png); }
header.top nav a[href="/settings"]::before,
header.top nav a[href="/aihelp"]::before { background-image: url(icons/gear-w.png); }

/* ---------- пустые экраны ---------- */
.card.empty::before {
  content: ""; display: block; width: 120px; height: 90px; margin: 0 auto 10px;
  background: url(icons/empty-inbox.png) center / contain no-repeat;
}

/* ---------- тёмная тема: значки светлеют, золото остаётся золотым ---------- */
:root[data-theme="dark"] .tabbar .sheet a::before,
:root[data-theme="dark"] .card.empty::before,
:root[data-theme="dark"] .tabbar>a.on[href="/"] .ti,
:root[data-theme="dark"] .tabbar>a.on[href="/chats"] .ti,
:root[data-theme="dark"] .tabbar>a.on[href="/team"] .ti,
:root[data-theme="dark"] .tabbar>a.on[href="/team/tasks"] .ti,
:root[data-theme="dark"] .tabbar>a.on[href="/dashboard"] .ti,
:root[data-theme="dark"] .tabbar>a.on[href="/docs"] .ti {
  filter: invert(1) hue-rotate(180deg);
}
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/"] .ti,
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/chats"] .ti,
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/team"] .ti,
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/team/tasks"] .ti,
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/dashboard"] .ti,
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/docs"] .ti {
  filter: invert(1) hue-rotate(180deg) grayscale(1);
}

/* ---------- верхнее меню: на активной (светлой) плашке — обычные тёмные значки ---------- */
header.top nav a.on[href="/"]::before { background-image: url(icons/zakazy.png); }
header.top nav a.on[href="/chats"]::before { background-image: url(icons/chaty.png); }
header.top nav a.on[href="/team"]::before { background-image: url(icons/komanda.png); }
header.top nav a.on[href="/team/tasks"]::before { background-image: url(icons/zadachi.png); }
header.top nav a.on[href="/dashboard"]::before { background-image: url(icons/svodka.png); }
header.top nav a.on[href="/docs"]::before { background-image: url(icons/dokumenty.png); }
header.top nav a.on[href="/settings"]::before,
header.top nav a.on[href="/aihelp"]::before { background-image: url(icons/gear.png); }

/* ---------- шапка: кнопка темы и колокольчик ---------- */
#themebtn svg, #bell svg { display: none; }
#themebtn, #bell {
  display: inline-block; width: 22px; height: 22px; vertical-align: middle;
  background-position: center; background-size: contain; background-repeat: no-repeat;
}
#themebtn { background-image: url(icons/moon-w.png); }
:root[data-theme="dark"] #themebtn { background-image: url(icons/sun-w.png); }
#bell { background-image: url(icons/belloff-w.png); }
#bell[title^="Звук и уведомления включены"] { background-image: url(icons/bell-w.png); }
@media (max-width: 760px) { #themebtn, #bell { width: 24px; height: 24px; } }

/* ---------- чат: лупа «поиск по переписке» ---------- */
.chathead .msearchbtn {
  font-size: 0; color: transparent; width: 30px; height: 30px; padding: 0;
  background: url(icons/poisk.png) center / 22px no-repeat;
}
/* на телефоне лупа в правом верхнем углу шапки и не переносится отдельной строкой */
@media (max-width: 760px) {
  .chathead { position: relative; padding-right: 48px; }
  .chathead .msearchbtn { position: absolute; top: 10px; right: 12px; margin: 0; }
}

/* ---------- поле сообщения: скрепка и «Документ с Диска» ---------- */
label.clip, .clip.docbtn {
  font-size: 0; color: transparent;
  background-position: center; background-size: 22px; background-repeat: no-repeat;
}
label.clip { background-image: url(icons/clip.png); }
.clip.docbtn { background-image: url(icons/vlozheniya.png); }

/* тёмная тема для лупы и кнопок поля сообщения: светлые варианты картинок (фон кнопок не трогаем) */
:root[data-theme="dark"] .chathead .msearchbtn { background-image: url(icons/poisk-w.png); }
:root[data-theme="dark"] label.clip { background-image: url(icons/clip-w.png); }
:root[data-theme="dark"] .clip.docbtn { background-image: url(icons/vlozheniya-w.png); }

/* ===== 15.10 (днём): скрепка на телефоне, скрепка у клиентов, облако, ИИ, шестерёнка ===== */

/* скрепка и облако: правила посильнее мобильного .composer .clip { background: none } */
.composer label.clip, .composer summary.clip, .composer .clip.docbtn {
  font-size: 0; color: transparent;
  background-position: center; background-size: 22px; background-repeat: no-repeat;
}
.composer label.clip, .composer summary.clip { background-image: url(icons/clip.png); }
.composer .clip.docbtn { background-image: url(icons/cloud.png); }
.composer summary.clip { list-style: none; }
.composer summary.clip::-webkit-details-marker { display: none; }
:root[data-theme="dark"] .composer label.clip,
:root[data-theme="dark"] .composer summary.clip { background-image: url(icons/clip-w.png); }
:root[data-theme="dark"] .composer .clip.docbtn { background-image: url(icons/cloud-w.png); }

/* картинки, которые icons.js ставит вместо эмодзи в кнопках (⚙️ 📞 📏 📦 габариты, 📁 Диск) */
img.vpi { width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: .15em; display: inline-block; }
:root[data-theme="dark"] img.vpi { filter: invert(1) hue-rotate(180deg); }

/* ИИ: значок вкладки и картинка на пустом экране */
.tabbar>a[href="/ai"] .ti {
  font-size: 0; color: transparent; display: block; width: 24px; height: 24px; margin: 0 auto;
  background: url(icons/ai2.png) center / contain no-repeat;
}
:root[data-theme="dark"] .tabbar>a.on[href="/ai"] .ti { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .tabbar>a:not(.on)[href="/ai"] .ti { filter: invert(1) hue-rotate(180deg) grayscale(1); }
header.top nav a[href="/ai"]::before {
  content: ""; display: inline-block; width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px;
  background: url(icons/ai2-w.png) center / contain no-repeat; opacity: .8;
}
header.top nav a.on[href="/ai"]::before { background-image: url(icons/ai2.png); opacity: 1; }
#aiempty::before {
  content: ""; display: block; width: 170px; height: 170px; margin: 0 auto 14px;
  background: url(icons/ai-hero.png) center / contain no-repeat;
}
:root[data-theme="dark"] #aiempty::before { background-color: #F7F6F3; border-radius: 50%; background-size: 82%; background-position: center 70%; }

/* шестерёнка настроек голоса во вкладке «ИИ» (кнопка только из эмодзи) — заменяет icons.js */

/* скрепка в чатах клиентов: на странице чатов свой стиль .composer details.clipmenu > summary.clip — перекрываем его */
:root .composer details.clipmenu > summary.clip {
  font-size: 0; color: transparent;
  background: url(icons/clip.png) center / 22px no-repeat;
}
:root[data-theme="dark"] .composer details.clipmenu > summary.clip { background-image: url(icons/clip-w.png); }

/* значок «Уведомления отключены» в списке чатов */
.favmark[title="Уведомления отключены"] {
  font-size: 0; color: transparent; display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
  background: url(icons/bez-zvuka.png) center / contain no-repeat;
}
:root[data-theme="dark"] .favmark[title="Уведомления отключены"] { filter: invert(1) hue-rotate(180deg); }

/* значок группового чата, заменённый icons.js (🚚 Логистика) */
.gicon.emo img.vpava { width: 68%; height: 68%; margin: 0; vertical-align: middle; }
