/* Floating Contacts Component */
.floating-contacts {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fc-menu {
  position: absolute;
  bottom: calc(100% + 20px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              visibility 0.3s;
  pointer-events: none;
}

.floating-contacts.is-open .fc-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.fc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-direction: row-reverse;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-item svg {
  width: 24px;
  height: 24px;
  color: #fff;
  fill: currentColor;
}

.fc-item.fc-phone svg {
  fill: none;
  stroke: currentColor;
}

.fc-item:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.fc-label {
  position: absolute;
  right: calc(100% + 15px);
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.fc-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
}

.fc-item:hover .fc-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.fc-phone { background-color: var(--primary); }
.fc-viber { background-color: #7360f2; }
.fc-telegram { background-color: #229ED9; }

.fc-main-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb, 4, 150, 255), 0.4);
  color: #fff;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.fc-main-btn:hover {
  transform: scale(1.05);
  background-color: var(--primary-dark, #037edb);
}

.fc-main-btn svg {
  width: 28px;
  height: 28px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fc-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.floating-contacts.is-open .fc-icon-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.floating-contacts.is-open .fc-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

@media (max-width: 768px) {
  .floating-contacts {
    bottom: 20px;
    right: 20px;
  }
  .fc-main-btn {
    width: 54px;
    height: 54px;
  }
  .fc-main-btn svg {
    width: 24px;
    height: 24px;
  }
  .fc-item {
    width: 44px;
    height: 44px;
  }
  .fc-item svg {
    width: 20px;
    height: 20px;
  }
  .fc-label {
    display: none; /* Hide labels on mobile to avoid screen overflow */
  }
}
