:root {
  --ssc-phone-main-color: #e60000;
}

.ssc-sticky-contact {
  position: fixed;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  animation-duration: 0.8s;
  animation-fill-mode: both;
}

.ssc-sticky-contact.ssc-bottomLeft {
  left: 0;
  bottom: var(--ssc-vertical, 10%);
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  animation-name: sscFadeInLeft;
}

.ssc-sticky-contact.ssc-bottomRight {
  right: 0;
  bottom: var(--ssc-vertical, 10%);
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  animation-name: sscFadeInRight;
}

.ssc-sticky-contact.ssc-topLeft {
  left: 0;
  top: var(--ssc-vertical, 10%);
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  animation-name: sscFadeInLeft;
}

.ssc-sticky-contact.ssc-topRight {
  right: 0;
  top: var(--ssc-vertical, 10%);
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  animation-name: sscFadeInRight;
}

.ssc-sticky-contact .ssc-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.ssc-sticky-contact .ssc-item:hover {
  transform: scale(1.08);
}

.ssc-sticky-contact .ssc-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ssc-sticky-contact .ssc-item i {
  font-size: 20px;
  color: var(--theme-color, #245692);
}

@keyframes sscFadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes sscFadeInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 767px) {
  .ssc-sticky-contact {
    padding: 6px;
    gap: 6px;
  }

  .ssc-sticky-contact .ssc-item {
    width: 40px;
    height: 40px;
  }
}

.ssc-sticky-contact.ssc-bottomLeft .floating-phone-btn {
  bottom: -3em;
  left: 10px;
  padding-right: 24px;
}

.ssc-sticky-contact.ssc-bottomLeft .phone-icon-box {
  margin-right: 12px;
}

.ssc-sticky-contact.ssc-bottomRight .floating-phone-btn {
  bottom: -3em;
  right: 10px;
  flex-direction: row-reverse;
  padding-left: 24px;
}

.ssc-sticky-contact.ssc-bottomRight .phone-icon-box {
  margin-left: 12px;
}

/* Khung chứa nút - Định vị cố định góc dưới màn hình */
.floating-phone-btn {
  position: fixed;
  display: flex;
  align-items: center;
  background-color: #fff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  /* padding: 0 24px 0 0; */
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 1px 5px rgba(230, 0, 0, 0.4);
  z-index: 9999;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
  border: 2px solid #e60000;
}

/* Hiệu ứng phóng to nhẹ khi di chuột vào nút */
.floating-phone-btn:hover {
  transform: scale(1.05);
  background-color: #e60000;
}

.floating-phone-btn:hover .phone-number {
  color: #fff;
}

/* Vòng tròn chứa icon và sóng nước */
.phone-icon-box {
  position: relative;
  width: 45px;
  height: 45px;
  background-color: #e60000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* margin-right: 12px; */
}

/* Định dạng riêng cho icon điện thoại và kích hoạt lắc lư */
.phone-inside {
  position: relative;
  z-index: 10;
  /* Đảm bảo icon nằm trên các lớp sóng */
  color: #fff;
  font-size: 20px;
  animation: phoneShake 1.5s infinite ease-in-out;
}

/* Chữ số điện thoại */
.phone-number {
  position: relative;
  z-index: 10;
  letter-spacing: 0.5px;
  color: #e60000;
}

/* --- HIỆU ỨNG SÓNG NƯỚC (PULSING CIRCLES) --- */
.pulse-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(230, 0, 0, 0.35);
  /* Màu sóng mờ */
  z-index: 1;
  pointer-events: none;
}

/* Kích hoạt hiệu ứng lan tỏa lệch pha nhau để tạo độ mượt */
.pulse-1 {
  animation: pulseExpand 2s infinite ease-out 0s;
}

.pulse-2 {
  animation: pulseExpand 2s infinite ease-out 0.6s;
}

.pulse-3 {
  animation: pulseExpand 2s infinite ease-out 1.2s;
}

/* Animation mở rộng và mờ dần của sóng */
@keyframes pulseExpand {
  0% {
    width: 45px;
    height: 45px;
    opacity: 1;
  }

  100% {
    width: 110px;
    /* Sóng lan rộng ra tối đa 110px */
    height: 110px;
    opacity: 0;
    /* Biến mất hoàn toàn ở rìa ngoài */
  }
}

/* Animation lắc lư (Shake) của icon */
@keyframes phoneShake {
  0% {
    transform: rotate(0);
  }

  10% {
    transform: rotate(-15deg);
  }

  20% {
    transform: rotate(15deg);
  }

  30% {
    transform: rotate(-15deg);
  }

  40% {
    transform: rotate(15deg);
  }

  50% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(0);
  }
}
