
/* Изоляция всего виджета: никакие внешние стили не должны сюда проникать */
.contact-widget-wrapper {
  all: initial; /* жёсткий сброс всех наследуемых стилей */
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif !important;
  color: inherit !important;
}

/* Разрешаем наследование только для базовых свойств внутри */
.contact-widget-wrapper * {
  all: revert;
  box-sizing: border-box;
}

.contact-widget-wrapper {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.contact-widget-wrapper.contact-widget-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Контейнер-обертка не нужен: элементы позиционируются абсолютно */

/* Плавающая кнопка */
.contact-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999; /* максимально высокий z-index */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #121212;
  color: #fff;
  border: none;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  isolation: isolate;
    line-height: 1;
    white-space: nowrap; /* запрещает перенос текста и «схлопывание» */
}

.contact-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.contact-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #10660d;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Простая иконка-заглушка: можно заменить на SVG */
.contact-icon::before {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 2; /* Поверх фона иконки */
}

.contact-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  position: relative;
  z-index: 4; /* текст гарантированно поверх всего внутри кнопки */
  white-space: nowrap;
  padding: 0 4px;
  display: block;      /* предотвращает схлопывание отступов */
  margin: 0;           /* явный сброс, чтобы не наезжало */
}

.contact-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #fff;
  flex-shrink: 0;         /* чтобы не сжималась */
  display: block;         /* явный блок */
  margin: 0;              /* убираем любые внешние отступы */
  transition: transform 0.2s ease;
}

.contact-toggle[aria-expanded="true"] .contact-arrow {
  transform: rotate(180deg);
}

/* Панель с мессенджерами */
.contact-panel {
  position: fixed;
  bottom: 84px; /* высота кнопки + отступ */
  right: 24px;
  z-index: 10000;
  width: 340px;
  max-width: 90vw;
  background: #121212;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.contact-panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contact-title {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #1e1e1e;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}

.contact-item:hover {
  background: #2a2a2a;
}

.contact-item-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.contact-item-icon.whatsapp {
  background-color: #25D366;
  background-image: url("/info/img/2025/whatsapp-64x64.png");
}

.contact-item-icon.telegram {
  background-color: #2481cc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 11.944 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.01-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.356 4.025-1.627 4.476-1.635z'%3E%3C/path%3E%3C/svg%3E");
}

.contact-item-icon.max {
  background-color: #6c5ce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 14h-2v-2h2v2zm0-4h-2V7h2v5z'%3E%3C/path%3E%3C/svg%3E");
}

.contact-item-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.contact-item-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.contact-item-action {
  color: #a0a0a0;
  font-size: 13px;
  font-weight: 500;
}


.contact-item-icon.vk {
  background-color: #0077FF;
  background-image: url("/info/img/2025/vk.png");
}
.contact-item.contact-item-email {
  background: #1e1e1e;
} 

.contact-item.contact-item-email:hover {
  background: #2a2a2a;
}

.contact-item-icon.email {
  background-color: #FF5252; /* цвет конверта — можно поменять */
  background-image: url("/dis/version3/ssi/img/2/530.jpg");
}  