/* === Floating UI: кнопка «Связь» + drop-up + модалка GF #9 === */

:root {
  --ec-contact-right: 30px;
  /* Канон-фолбэк: не трогаем Enfold #scroll-top-link, а кнопку «Связь» ставим над ней.
     Если настройка отступов в Enfold иная — можно тюнить этой переменной. */
  --ec-contact-bottom: 90px;

  /* Размер участвует только в позиционировании flyout. */
  --ec-contact-size: 44px;
  --ec-contact-gap: 16px;
  --ec-contact-flyout-gap: 12px;
}

/* === Кнопка «Связь» === */

#ec-contact-link {
  opacity: 0.75;
  position: fixed;
  right: var(--ec-contact-right);
  bottom: var(--ec-contact-bottom);
  z-index: 9999;
  cursor: pointer;
  border-radius: 4px !important; /* попробуй 3px или 2px если надо ещё “квадратнее” */

  /* Страховка: Enfold может рассчитывать на SVG-иконки и задавать «невидимый» color.
     Здесь нам нужно гарантировать видимость иконки текстом. */
  color: #fff;

  /* Если Enfold не задаёт размеры для этой ссылки — центруем контент и даём минимум. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ec-contact-size);
  min-height: var(--ec-contact-size);
}

#ec-contact-link .ec-contact-link-icon {
  font-size: 18px;
  line-height: 1;
}

/* === Drop-up (flyout) === */

.ec-contact-flyout {
  position: fixed;
  right: var(--ec-contact-right);
  bottom: calc(var(--ec-contact-bottom) + var(--ec-contact-size) + var(--ec-contact-flyout-gap));
  z-index: 10000;

  width: 280px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;

  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: none;
}

.ec-contact-flyout[aria-hidden="true"] {
  display: none;
}

.ec-contact-flyout[aria-hidden="false"] {
  display: block;
}

.ec-contact-flyout__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 60vh;
  overflow: auto;
}

.ec-contact-flyout__btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
}

.ec-contact-flyout__btn:hover,
.ec-contact-flyout__btn:focus {
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}

/* === Модалка GF #9 === */

.ec-contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100001;
}

.ec-contact-modal.is-open {
  display: block;
}

.ec-contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.ec-contact-modal__window {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  margin: 10vh auto 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  max-height: 80vh;
  overflow: auto;
  padding: 18px 18px 22px;
}

.ec-contact-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.ec-contact-modal-open {
  overflow: hidden;
}

