﻿/* ============================================================
   VI FEERIE — Floating Sticky Contact & Back to Top Widget
   ============================================================ */

.sticky-contact {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Nút mạng xã hội & mua sắm */
.sticky-contact__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
  outline: none;
  background: #ffffff;
}

.sticky-contact__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Hiệu ứng sóng nhẹ nhịp thở (Pulse) cho icon đầu tiên/Shopee */
.sticky-contact__item--pulse::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(238, 77, 45, 0.5);
  animation: stickyPulse 2.2s infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes stickyPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Hover state */
.sticky-contact__item:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

/* Tooltip nhãn trượt ra bên trái khi rê chuột */
.sticky-contact__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(28, 19, 12, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  backdrop-filter: blur(4px);
}

.sticky-contact__tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(28, 19, 12, 0.92);
}

.sticky-contact__item:hover .sticky-contact__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Nút Back to Top */
.sticky-backtotop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(56, 34, 19, 0.2);
  cursor: pointer;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    background 0.25s var(--ease), box-shadow 0.25s var(--ease);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.85);
  margin-top: 4px;
}

.sticky-backtotop svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
  transition: transform 0.25s var(--ease);
}

.sticky-backtotop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sticky-backtotop:hover {
  background: var(--brand-deep);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(143, 107, 132, 0.35);
}

.sticky-backtotop:hover svg {
  transform: translateY(-2px);
}

.sticky-backtotop:hover .sticky-contact__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media screen and (max-width: 768px) {
  .sticky-contact {
    right: 16px;
    bottom: 20px;
    gap: 10px;
  }

  .sticky-contact__item {
    width: 42px;
    height: 42px;
  }

  .sticky-backtotop {
    width: 38px;
    height: 38px;
  }

  .sticky-backtotop svg {
    width: 17px;
    height: 17px;
  }

  .sticky-contact__tooltip {
    display: none; /* Ẩn tooltip trên mobile để tránh che nội dung */
  }
}
