/* Floating Contact Widget */
.irc-floating-contact {
  position: fixed;
  bottom: 100px;
  right: 15px;
  left: auto;
  z-index: 9999;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px; /* Fixed width for alignment Center */
}

/* Trigger Button */
.irc-fc-trigger {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 124, 252, 0.4);
  z-index: 20;
  transition: transform 0.3s;
}

.irc-fc-trigger i {
  font-size: 22px;
  color: #fff;
  transition: all 0.3s;
  line-height: 1;
}

.irc-fc-trigger:hover {
  transform: scale(1.05);
}

/* Icons state */
.irc-fc-icon-open,
.irc-fc-icon-close {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.irc-fc-icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-180deg);
}

.irc-floating-contact.active .irc-fc-icon-open {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg);
}

.irc-floating-contact.active .irc-fc-icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Ripple Animation */
.irc-fc-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: -1;
  animation: irc-ripple 2s infinite;
}

.irc-fc-ripple:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 124, 252, 0.3);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: irc-ripple-bg 2s infinite;
}

@keyframes irc-ripple {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.8;
  }
  100% {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

@keyframes irc-ripple-bg {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.4;
  }
  100% {
    width: 160%;
    height: 160%;
    opacity: 0;
  }
}

/* Contact List */
.irc-fc-list {
  position: absolute;
  bottom: 60px;
  right: 0;
  left: 0; /* Center in container */
  width: 100%; /* Match container width */
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.irc-floating-contact.active .irc-fc-list {
  pointer-events: auto;
}

.irc-fc-item {
  width: 50px; /* Same size as trigger */
  height: 50px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 2px solid #fff; /* White border */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px) scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.irc-fc-item i,
.irc-fc-item svg {
  width: 22px;
  height: 22px;
  font-size: 22px;
  fill: #fff;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.irc-fc-item svg path {
  fill: #fff !important;
}

.irc-fc-item:hover {
  background: var(--color-primary-light);
  color: #fff;
}

/* Staggered Animation for Items */
.irc-floating-contact.active .irc-fc-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.irc-floating-contact.active .irc-fc-item:nth-child(1) {
  transition-delay: 0.05s;
}
.irc-floating-contact.active .irc-fc-item:nth-child(2) {
  transition-delay: 0.1s;
}
.irc-floating-contact.active .irc-fc-item:nth-child(3) {
  transition-delay: 0.15s;
}
.irc-floating-contact.active .irc-fc-item:nth-child(4) {
  transition-delay: 0.2s;
}
.irc-floating-contact.active .irc-fc-item:nth-child(5) {
  transition-delay: 0.25s;
}

/* Tooltip (Title) - Positioned LEFT since widget is on RIGHT */
.irc-fc-item[title]:after {
  content: attr(title);
  position: absolute;
  right: 60px; /* Show to the left */
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  pointer-events: none;
}

.irc-fc-item:hover:after {
  opacity: 1;
  visibility: visible;
}

/* Scroll To Top Button */
.irc-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px; /* Aligned with floating widget (35px center) */
  width: 35px;
  height: 35px;
  background: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.irc-scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.irc-scroll-top i {
  color: var(--color-primary);
  font-size: 14px;
  line-height: 1;
}

.irc-scroll-top:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 124, 252, 0.3);
}

.irc-scroll-top:hover i {
  color: #fff;
}
