/* Плавающий виджет мессенджеров */
.msg-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: Inter, system-ui, sans-serif;
  display: none;
}
.msg-widget.is-visible {
  display: block;
}
.msg-widget__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 260px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 17, 23, 0.22);
  padding: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.msg-widget.is-open .msg-widget__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.msg-widget__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #1a1d27;
  transition: background 0.2s ease;
}
.msg-widget__item:hover {
  background: #f4f5f8;
}
.msg-widget__item + .msg-widget__item {
  margin-top: 4px;
}
.msg-widget__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.msg-widget__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.msg-widget__icon--phone { background: var(--msg-accent, #ff5b01); }
.msg-widget__icon--whatsapp { background: #25d366; }
.msg-widget__icon--telegram { background: #2aabee; }
.msg-widget__icon--max {
  background: linear-gradient(135deg, #7b2ff7 0%, #0077ff 50%, #00c6ff 100%);
}
.msg-widget__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.msg-widget__label strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.msg-widget__label span {
  font-size: 12px;
  color: #8b90a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-widget__trigger {
  position: relative;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--msg-accent, #ff5b01);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  color: #111;
  margin-left: auto;
}
.msg-widget__trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.msg-widget__trigger .icon-close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.msg-widget.is-open .msg-widget__trigger .icon-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
.msg-widget.is-open .msg-widget__trigger .icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.msg-widget__halo {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--msg-accent, #ffe16c) 55%, transparent);
  animation: msg-widget-pulse 2s ease-out infinite;
  pointer-events: none;
}
.msg-widget.is-open .msg-widget__halo {
  display: none;
}
@keyframes msg-widget-pulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
@media (max-width: 480px) {
  .msg-widget {
    right: 14px;
    bottom: 14px;
  }
  .msg-widget__panel {
    width: calc(100vw - 28px);
    max-width: 280px;
  }
}
/* Скрыть старый нижний бар мессенджеров, если есть */
.widget__contacts { display: none !important; }
