.dsg-floating-contact {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 25;
  font-family: var(--wp--preset--font-family--sans);
}
.dsg-floating-contact__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgb(255 255 255 / .25);
  border-radius: 50%;
  background: var(--dsg-accent);
  color: #fff;
  box-shadow: 0 6px 24px var(--dsg-popup-shadow);
  cursor: pointer;
  list-style: none;
}
.dsg-floating-contact__toggle::-webkit-details-marker { display: none; }
.dsg-floating-contact__toggle::marker { content: ''; }
.dsg-floating-contact__toggle:hover { background: var(--dsg-accent-hover); }
.dsg-floating-contact svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dsg-floating-contact__toggle .dsg-floating-contact__close,
.dsg-floating-contact[open] .dsg-floating-contact__chat { display: none; }
.dsg-floating-contact[open] .dsg-floating-contact__close { display: block; }
.dsg-floating-contact__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(260px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 20px;
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--text);
  box-shadow: 0 12px 40px var(--dsg-popup-shadow);
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
}
.dsg-floating-contact__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}
.dsg-floating-contact__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}
.dsg-floating-contact__link:hover { background: var(--dsg-hover-surface); }
.dsg-floating-contact__icon {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 50%;
  background: var(--dsg-accent);
  color: #fff;
}
.dsg-floating-contact__icon svg { width: 22px; height: 22px; }
.dsg-floating-contact__messenger .dsg-floating-contact__icon { background: #405fe5; }
.dsg-floating-contact__viber .dsg-floating-contact__icon { background: #812379; }
.dsg-floating-contact :is(summary, a):focus-visible {
  outline: 2px solid var(--dsg-signal);
  outline-offset: 3px;
}
@media (min-width: 701px) {
  .dsg-floating-contact__call,
  .dsg-floating-contact--call-only { display: none; }
}
@media (max-width: 700px) {
  .dsg-floating-contact {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  .dsg-floating-contact__toggle { width: 56px; height: 56px; }
  .dsg-floating-contact__panel { bottom: 70px; }
}
@media print { .dsg-floating-contact { display: none; } }
