.gd-telegram {
  box-sizing: border-box;
  position: fixed;
  z-index: 99;
  bottom: calc(var(--gd-telegram-offset, 32px) + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 40px);
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 24px;
  background: #087caf;
  color: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 16%);
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}

.gd-telegram--right { right: max(20px, env(safe-area-inset-right, 0px)); }
.gd-telegram--left { left: max(20px, env(safe-area-inset-left, 0px)); }
.gd-telegram svg { flex-shrink: 0; }
.gd-telegram__label { overflow-wrap: anywhere; }

.gd-telegram--icon-only {
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 12px;
}

.gd-telegram:hover,
.gd-telegram:focus-visible {
  background: #06658f;
  color: #fff;
  text-decoration: none;
}

.gd-telegram:focus-visible {
  outline: 3px solid #182d3b;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .gd-telegram {
    bottom: calc(max(116px, var(--gd-telegram-offset, 32px)) + env(safe-area-inset-bottom, 0px));
    max-width: min(240px, calc(100vw - 40px));
  }
}
