.contact-widget {
  --cw-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  font-family: "Montserrat", sans-serif;
}

.contact-widget__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.28s var(--cw-ease), transform 0.28s var(--cw-ease), visibility 0.28s linear;
}

.contact-widget__action,
.contact-widget__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.contact-widget__action {
  border-radius: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.86);
  box-shadow: none;
  transition: opacity 0.3s var(--cw-ease), transform 0.3s var(--cw-ease), box-shadow 0.22s ease, filter 0.22s ease;
}

.contact-widget__toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.06));
  opacity: 0.7;
  pointer-events: none;
}

.contact-widget__toggle::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 48%);
  opacity: 0.9;
  pointer-events: none;
}

.contact-widget__action:hover,
.contact-widget__action:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: none;
  filter: brightness(1.03);
}

.contact-widget__toggle:hover,
.contact-widget__toggle:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 24px 48px rgba(27, 15, 45, 0.28);
  filter: saturate(1.05);
}

.contact-widget__icon,
.contact-widget__toggle-mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-widget__icon {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 14px 26px rgba(35, 43, 88, 0.16));
}

.contact-widget__icon img {
  width: 62px;
  height: 62px;
  display: block;
}

.contact-widget__action--max .contact-widget__icon,
.contact-widget__action--max .contact-widget__icon img {
  width: 54px;
  height: 54px;
}

.contact-widget__toggle {
  width: auto;
  min-width: 62px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 22px 0 16px;
  border-radius: 20px;
  background: linear-gradient(155deg, #ffb347 0%, #ff8c1a 45%, #d95a00 100%);
  box-shadow: 0 22px 52px rgba(217, 90, 0, 0.34);
  transition: transform 0.26s var(--cw-ease), box-shadow 0.26s var(--cw-ease), filter 0.22s ease;
}

.contact-widget__toggle-mark {
  width: 30px;
  height: 30px;
}

.contact-widget__toggle-mark svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: #ffffff;
}

.contact-widget__toggle-label {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.contact-widget--open .contact-widget__toggle {
  box-shadow: 0 26px 56px rgba(217, 90, 0, 0.4);
  filter: saturate(1.06);
}

.contact-widget--open .contact-widget__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-widget--open .contact-widget__action {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.contact-widget--open .contact-widget__action:nth-child(1) {
  transition-delay: 0.02s;
}

.contact-widget--open .contact-widget__action:nth-child(2) {
  transition-delay: 0.06s;
}

.contact-widget--open .contact-widget__action:nth-child(3) {
  transition-delay: 0.1s;
}

@media (max-width: 767px) {
  .contact-widget {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .contact-widget__panel {
    gap: 8px;
    bottom: calc(100% + 10px);
  }

  .contact-widget__action,
  .contact-widget__toggle {
    width: 58px;
    min-width: 58px;
    height: 58px;
  }

  .contact-widget__toggle {
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .contact-widget__icon,
  .contact-widget__toggle-mark {
    width: 58px;
    height: 58px;
  }

  .contact-widget__toggle-mark svg,
  .contact-widget__icon img {
    width: 58px;
    height: 58px;
  }

  .contact-widget__action--max .contact-widget__icon,
  .contact-widget__action--max .contact-widget__icon img {
    width: 50px;
    height: 50px;
  }

  .contact-widget__toggle-label {
    display: none;
  }
}
