/* Chat & Call Buttons — плавающая кнопка связи.
   Цвет кнопки задаётся инлайн-переменной --czcb-color; кружки каналов в
   веере — брендовыми цветами через --czcb-item. */

.czcb {
  position: fixed;
  bottom: 20px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: inherit;
}
.czcb-br { right: 20px; }
.czcb-bl { left: 20px; align-items: flex-start; }

/* Клиентская отсечка устройств. */
@media (min-width: 769px) {
  .czcb-no-desktop { display: none; }
}
@media (max-width: 768px) {
  .czcb-no-mobile { display: none; }
}

.czcb-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--czcb-color, #2563eb);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.czcb-fab:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
.czcb-fab svg { display: block; }

/* Смена иконки чат/крест при открытом веере. !important — темы нередко задают
   базовое `svg {display:...}` с большей специфичностью (body.theme svg). */
.czcb .czcb-ico-close { display: none !important; }
.czcb.is-open .czcb-ico-chat { display: none !important; }
.czcb.is-open .czcb-ico-close { display: block !important; }

.czcb-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 200px;
  background: #fff;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .22);
  padding: 8px;
  transform-origin: bottom right;
  animation: czcb-pop .18s ease;
}
.czcb-bl .czcb-menu { transform-origin: bottom left; }
.czcb-menu[hidden] { display: none; }

@keyframes czcb-pop {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.czcb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 15px;
  line-height: 1.2;
}
.czcb-item:hover { background: rgba(0, 0, 0, .06); }

.czcb-item-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--czcb-item, #2563eb);
  color: #fff;
}
.czcb-item-ico svg { width: 20px; height: 20px; }
.czcb-item-label { font-weight: 600; }

/* Подсказка-приветствие возле кнопки. */
.czcb-tip {
  position: relative;
  order: -1;
  max-width: 240px;
  background: #fff;
  color: #1f2937;
  padding: 10px 30px 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .2);
  font-size: 14px;
  line-height: 1.4;
  animation: czcb-pop .25s ease;
}
.czcb-tip[hidden] { display: none; }
.czcb-tip-x {
  position: absolute;
  top: 2px;
  right: 6px;
  border: 0;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  padding: 2px;
}
.czcb-tip-x:hover { opacity: 1; }

@media (prefers-color-scheme: dark) {
  .czcb-menu, .czcb-tip { background: #1f2430; color: #e5e7eb; }
  .czcb-item:hover { background: rgba(255, 255, 255, .08); }
}
