/* ==========================================================
   vAvtobyse 2.9.19 — STATUS BUS FINAL
   One final geometry layer for ALL themes.
   No JS. No canvas. No PNG modification.
   ========================================================== */


/* ----------------------------------------------------------
   BASE BADGE
   ---------------------------------------------------------- */

html body .bus-presence-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;

  min-width: 0 !important;

  vertical-align: middle !important;
  flex: 0 0 auto !important;
}


html body .bus-presence {
  box-sizing: border-box !important;

  width: 32px !important;
  height: 34px !important;

  min-width: 32px !important;
  min-height: 34px !important;
  max-width: 32px !important;
  max-height: 34px !important;

  flex: 0 0 32px !important;

  display: inline-grid !important;
  place-items: center !important;

  padding: 2px !important;

  overflow: hidden !important;

  background:
    linear-gradient(
      180deg,
      #252c30 0%,
      #101517 100%
    ) !important;

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent, #d5ac42) 72%,
      #62572f
    ) !important;

  border-radius: 6px !important;

  box-shadow:
    inset 0 1px rgba(255,255,255,.08),
    inset 0 -1px rgba(0,0,0,.42),
    0 1px 3px rgba(0,0,0,.25) !important;

  filter: none !important;

  transform: none !important;
  animation: none !important;
  transition: none !important;
}


/* ----------------------------------------------------------
   PNG INSIDE BADGE

   ВАЖНО:
   - никаких translate()
   - никаких cover
   - никаких рамок на самом PNG
   ---------------------------------------------------------- */

html body
.bus-presence
.bus-presence-svg.status-bus-c-image {

  display: block !important;

  width: 24px !important;
  height: 27px !important;

  min-width: 24px !important;
  min-height: 27px !important;
  max-width: 24px !important;
  max-height: 27px !important;

  margin: auto !important;
  padding: 0 !important;

  object-fit: contain !important;
  object-position: center center !important;

  overflow: visible !important;

  background: transparent !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;
  filter: none !important;

  transform: none !important;

  animation: none !important;
  transition: none !important;

  pointer-events: none !important;

  image-rendering: pixelated !important;
}


/* ----------------------------------------------------------
   CHAT LIST — MOBILE + ALL THEMES

   Это самое заметное место.
   ---------------------------------------------------------- */

html.vav-mobile-layout[data-theme]
body.vav-shell-mode
#conversationList
.conversation-bus-presence
.bus-presence {

  width: 31px !important;
  height: 33px !important;

  min-width: 31px !important;
  min-height: 33px !important;
  max-width: 31px !important;
  max-height: 33px !important;

  flex-basis: 31px !important;

  padding: 2px !important;

  background:
    linear-gradient(
      180deg,
      #252c30 0%,
      #101517 100%
    ) !important;

  border: 1px solid
    color-mix(
      in srgb,
      var(--accent, #d5ac42) 72%,
      #62572f
    ) !important;

  border-radius: 6px !important;

  box-shadow:
    inset 0 1px rgba(255,255,255,.08),
    0 1px 3px rgba(0,0,0,.25) !important;

  filter: none !important;
  transform: none !important;
}


html.vav-mobile-layout[data-theme]
body.vav-shell-mode
#conversationList
.conversation-bus-presence
.bus-presence-svg.status-bus-c-image {

  width: 23px !important;
  height: 26px !important;

  min-width: 23px !important;
  min-height: 26px !important;
  max-width: 23px !important;
  max-height: 26px !important;

  margin: auto !important;

  object-fit: contain !important;
  object-position: center center !important;

  background: transparent !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;
  filter: none !important;

  transform: none !important;
}


/* ----------------------------------------------------------
   CHAT HEADER
   ---------------------------------------------------------- */

html.vav-mobile-layout[data-theme]
body.vav-shell-mode
.chat-title-line
.bus-presence {

  width: 30px !important;
  height: 32px !important;

  min-width: 30px !important;
  min-height: 32px !important;
  max-width: 30px !important;
  max-height: 32px !important;

  flex-basis: 30px !important;
}


html.vav-mobile-layout[data-theme]
body.vav-shell-mode
.chat-title-line
.bus-presence-svg.status-bus-c-image {

  width: 22px !important;
  height: 25px !important;

  min-width: 22px !important;
  min-height: 25px !important;
  max-width: 22px !important;
  max-height: 25px !important;

  object-fit: contain !important;
  object-position: center center !important;

  transform: none !important;
}


/* ----------------------------------------------------------
   ADDRESS BOOK
   Только размер автобуса.
   Геометрию карточек НЕ ТРОГАЕМ.
   ---------------------------------------------------------- */

html body
#directoryList
.search-presence
.bus-presence {

  width: 30px !important;
  height: 30px !important;

  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;

  flex-basis: 30px !important;
}


html body
#directoryList
.search-presence
.bus-presence-svg.status-bus-c-image {

  width: 22px !important;
  height: 24px !important;

  min-width: 22px !important;
  min-height: 24px !important;
  max-width: 22px !important;
  max-height: 24px !important;

  object-fit: contain !important;
  object-position: center center !important;

  transform: none !important;
}


/* ----------------------------------------------------------
   PROFILE / STATUS PREVIEW
   Там можно показать автобус чуть крупнее.
   ---------------------------------------------------------- */

html body
.activity-preview
.bus-presence {

  width: 39px !important;
  height: 42px !important;

  min-width: 39px !important;
  min-height: 42px !important;
  max-width: 39px !important;
  max-height: 42px !important;

  flex-basis: 39px !important;
}


html body
.activity-preview
.bus-presence-svg.status-bus-c-image {

  width: 30px !important;
  height: 34px !important;

  min-width: 30px !important;
  min-height: 34px !important;
  max-width: 30px !important;
  max-height: 34px !important;

  object-fit: contain !important;
  object-position: center center !important;

  transform: none !important;
}


/* ----------------------------------------------------------
   DESKTOP
   Сохраняем ту же пропорцию, без гигантских значков.
   ---------------------------------------------------------- */

@media (min-width: 821px) {

  html body
  #conversationList
  .conversation-bus-presence
  .bus-presence {

    width: 32px !important;
    height: 34px !important;

    min-width: 32px !important;
    max-width: 32px !important;

    flex-basis: 32px !important;
  }


  html body
  #conversationList
  .conversation-bus-presence
  .status-bus-c-image {

    width: 24px !important;
    height: 27px !important;

    min-width: 24px !important;
    max-width: 24px !important;

    object-fit: contain !important;
    object-position: center center !important;

    transform: none !important;
  }

}


/* === OFFLINE_BUS_OPTICAL_ALIGN_START === */

/*
  offline.png имеет визуально более крупный автобус,
  чем available.png. Контейнер НЕ меняем —
  уменьшаем только raster внутри него.
*/

/* Базовый offline */
html body
.bus-presence[data-status-icon="offline"]
.status-bus-c-image {
  width: 22px !important;
  height: 25px !important;

  min-width: 22px !important;
  min-height: 25px !important;
  max-width: 22px !important;
  max-height: 25px !important;

  margin: auto !important;

  object-fit: contain !important;
  object-position: center center !important;

  transform: none !important;
}


/* Список чатов — телефон */
html.vav-mobile-layout[data-theme]
body.vav-shell-mode
#conversationList
.conversation-bus-presence
.bus-presence[data-status-icon="offline"]
.status-bus-c-image {

  width: 21px !important;
  height: 24px !important;

  min-width: 21px !important;
  min-height: 24px !important;
  max-width: 21px !important;
  max-height: 24px !important;

  margin: auto !important;
}


/* Шапка чата */
html.vav-mobile-layout[data-theme]
body.vav-shell-mode
.chat-title-line
.bus-presence[data-status-icon="offline"]
.status-bus-c-image {

  width: 20px !important;
  height: 23px !important;

  min-width: 20px !important;
  min-height: 23px !important;
  max-width: 20px !important;
  max-height: 23px !important;
}


/* Адресная книга — только автобус, карточки НЕ трогаем */
html body
#directoryList
.search-presence
.bus-presence[data-status-icon="offline"]
.status-bus-c-image {

  width: 20px !important;
  height: 22px !important;

  min-width: 20px !important;
  min-height: 22px !important;
  max-width: 20px !important;
  max-height: 22px !important;
}


/* Профиль / крупное превью */
html body
.activity-preview
.bus-presence[data-status-icon="offline"]
.status-bus-c-image {

  width: 27px !important;
  height: 31px !important;

  min-width: 27px !important;
  min-height: 31px !important;
  max-width: 27px !important;
  max-height: 31px !important;
}


/* ПК */
@media (min-width:821px) {

  html body
  #conversationList
  .conversation-bus-presence
  .bus-presence[data-status-icon="offline"]
  .status-bus-c-image {

    width: 22px !important;
    height: 25px !important;

    min-width: 22px !important;
    min-height: 25px !important;
    max-width: 22px !important;
    max-height: 25px !important;
  }

}

/* === OFFLINE_BUS_OPTICAL_ALIGN_END === */

