.rs-contact-widget,
.rs-contact-widget * {
  box-sizing: border-box;
}

.rs-contact-widget {
  position: fixed;
  bottom: 22px;
  z-index: 999999;
  font-family: Arial, Helvetica, sans-serif;
}

.rs-desktop-left { left: 22px; }
.rs-desktop-right { right: 22px; }
.rs-desktop-center { left: 50%; transform: translateX(-50%); }

.rs-contact-toggle {
  min-width: 148px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  box-shadow: 0 14px 35px rgba(76, 29, 149, .35);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.rs-contact-toggle:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 42px rgba(76, 29, 149, .42);
}

.rs-contact-widget.rs-open .rs-contact-toggle {
  transform: translateY(-1px);
}

.rs-contact-desktop-icon,
.rs-contact-icon,
.rs-rotator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.rs-contact-desktop-icon svg,
.rs-contact-icon svg,
.rs-rotator-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rs-contact-mobile-rotator {
  display: none;
}

.rs-contact-arrow {
  display: inline-block;
  transition: transform .25s ease;
  font-size: 17px;
  margin-top: -2px;
}

.rs-contact-widget.rs-open .rs-contact-arrow {
  transform: rotate(180deg);
}

.rs-contact-menu {
  position: absolute;
  bottom: 68px;
  min-width: 230px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 20px 55px rgba(17,24,39,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.96);
  transition: opacity .2s ease, transform .2s ease;
}

.rs-desktop-left .rs-contact-menu { left: 0; }
.rs-desktop-right .rs-contact-menu { right: 0; }
.rs-desktop-center .rs-contact-menu { left: 50%; transform: translate(-50%, 12px) scale(.96); }
.rs-desktop-center.rs-open .rs-contact-menu { transform: translate(-50%, 0) scale(1); }

.rs-contact-widget.rs-open .rs-contact-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.rs-contact-menu::after {
  content: "";
  position: absolute;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: #fff;
  transform: rotate(45deg);
  border-right: 1px solid rgba(17,24,39,.08);
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.rs-desktop-left .rs-contact-menu::after { left: 36px; }
.rs-desktop-right .rs-contact-menu::after { right: 36px; }
.rs-desktop-center .rs-contact-menu::after { left: 50%; margin-left: -9px; }

.rs-contact-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  color: #111827;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: background .18s ease, transform .18s ease;
}

.rs-contact-item:hover {
  background: #f3f4f6;
  transform: translateX(2px);
}

.rs-contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
}

.rs-viber .rs-contact-icon { background: #7360f2; }
.rs-whatsapp .rs-contact-icon { background: #25d366; }
.rs-phone .rs-contact-icon { background: #2f80ed; }

@media (max-width: 767px) {
  .rs-contact-widget {
    bottom: 16px;
  }

  .rs-mobile-left {
    left: 16px !important;
    right: auto !important;
    transform: none !important;
  }

  .rs-mobile-right {
    right: 16px !important;
    left: auto !important;
    transform: none !important;
  }

  .rs-mobile-center {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  .rs-contact-toggle {
    min-width: 58px;
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
    animation: rsPulse 2.4s ease-in-out infinite;
  }

  .rs-contact-text,
  .rs-contact-arrow,
  .rs-contact-desktop-icon {
    display: none;
  }

  .rs-contact-mobile-rotator {
    position: relative;
    display: block;
    width: 26px;
    height: 26px;
  }

  .rs-rotator-icon {
    position: absolute;
    inset: 0;
    color: #fff;
    opacity: 0;
    transform: scale(.75) rotate(-8deg);
    animation: rsIconFade 6s infinite;
  }

  .rs-ri-viber { animation-delay: 0s; }
  .rs-ri-whatsapp { animation-delay: 2s; }
  .rs-ri-phone { animation-delay: 4s; }

  .rs-contact-menu {
    min-width: 220px;
    bottom: 72px;
  }

  .rs-mobile-left .rs-contact-menu {
    left: 0 !important;
    right: auto !important;
  }

  .rs-mobile-right .rs-contact-menu {
    right: 0 !important;
    left: auto !important;
  }

  .rs-mobile-center .rs-contact-menu {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, 12px) scale(.96);
  }

  .rs-mobile-center.rs-open .rs-contact-menu {
    transform: translate(-50%, 0) scale(1);
  }

  .rs-mobile-left .rs-contact-menu::after {
    left: 22px !important;
    right: auto !important;
  }

  .rs-mobile-right .rs-contact-menu::after {
    right: 22px !important;
    left: auto !important;
  }

  .rs-mobile-center .rs-contact-menu::after {
    left: 50% !important;
    right: auto !important;
    margin-left: -9px;
  }
}

@keyframes rsPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,.38), 0 14px 35px rgba(76,29,149,.35); }
  50% { box-shadow: 0 0 0 12px rgba(124,58,237,0), 0 18px 42px rgba(76,29,149,.42); }
}

@keyframes rsIconFade {
  0% { opacity: 0; transform: scale(.75) rotate(-8deg); }
  8% { opacity: 1; transform: scale(1) rotate(0deg); }
  28% { opacity: 1; transform: scale(1) rotate(0deg); }
  36% { opacity: 0; transform: scale(.75) rotate(8deg); }
  100% { opacity: 0; transform: scale(.75) rotate(8deg); }
}
