/* Плавающая кнопка контактов — тона сайта (чёрный / белый / серый) */

.cp-support {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 14000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  font-family: var(--font-main, Montserrat, system-ui, sans-serif);
  transition: bottom 0.2s ease;
}

.cp-support.is-cookie-up {
  bottom: 72px;
}

.cp-support__panel,
.cp-support__fab {
  pointer-events: auto;
}

.cp-support__fab {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: #0a0a0a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.cp-support__fab:hover {
  border-color: rgba(255, 255, 255, 0.16);
  filter: brightness(1.08);
}

.cp-support__fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.cp-support__fab-icon {
  display: block;
  width: 72%;
  height: 72%;
  margin: 0 auto;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.cp-support__fab-x {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-60deg) scale(0.7);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.cp-support__fab-x::before,
.cp-support__fab-x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.6px;
  background: #fff;
  border-radius: 1px;
}

.cp-support__fab-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cp-support__fab-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cp-support.is-open .cp-support__fab-icon {
  opacity: 0;
  transform: rotate(40deg) scale(0.6);
}

.cp-support.is-open .cp-support__fab-x {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.cp-support__panel {
  width: min(312px, calc(100vw - 36px));
  padding: 18px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 48%),
    #0c0c0e;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  color: #f5f5f5;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    visibility 0.24s ease;
}

.cp-support.is-open .cp-support__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cp-support__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cp-support__titles {
  min-width: 0;
}

.cp-support__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.cp-support__lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.48);
}

.cp-support__panel-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: #141416;
  color: #fff;
  cursor: pointer;
}

.cp-support__panel-close:hover {
  background: #1c1c1f;
}

.cp-support__panel-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cp-support__panel-close svg {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto;
}

.cp-support__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: transparent;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.cp-support__cta:hover {
  background: #fff;
  color: #0a0a0a;
}

.cp-support__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-support__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.cp-support__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cp-support__item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.cp-support__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #161618;
  color: #ececec;
}

.cp-support__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.cp-support__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-support__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.cp-support__hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .cp-support {
    right: 12px;
    bottom: 12px;
  }

  .cp-support.is-cookie-up {
    bottom: 68px;
  }

  .cp-support__fab {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-support__panel,
  .cp-support__fab-icon,
  .cp-support__fab-x {
    transition: none;
  }
}

@media print {
  .cp-support {
    display: none !important;
  }
}
