/* ============================================================
   SIAM SPA – Floating Contact Widget
   ============================================================ */

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

/* ── Main toggle button ── */
.float-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #590000, #8b0000);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(89,0,0,0.5);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.float-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(89,0,0,0.65);
}

.float-toggle svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
}

/* Rotate icon when open */
.float-contact.open .float-toggle {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #3a0000, #590000);
}

/* ── Sub icons container ── */
.float-items {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

/* Each sub icon */
.float-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(0,0,0,0.25);
  transform: translateY(20px) scale(0.5);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              opacity 0.28s ease,
              box-shadow 0.25s ease;
  position: relative;
}

/* Staggered open animation */
.float-contact.open .float-item {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.float-contact.open .float-item:nth-child(1) { transition-delay: 0.04s; }
.float-contact.open .float-item:nth-child(2) { transition-delay: 0.08s; }
.float-contact.open .float-item:nth-child(3) { transition-delay: 0.12s; }
.float-contact.open .float-item:nth-child(4) { transition-delay: 0.16s; }

.float-item:hover {
  transform: translateY(-3px) scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.float-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* Brand colours */
.float-item.tel      { background: #25d366; }
.float-item.line     { background: #00b900; }
.float-item.wechat   { background: #09b83e; }
.float-item.facebook { background: #1877f2; }

/* ── Tooltip label ── */
.float-item::before {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,10,10,0.88);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  font-family: 'ath-regular', sans-serif;
}

.float-item:hover::before {
  opacity: 1;
}

/* ── Pulse ring on toggle ── */
.float-toggle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(89,0,0,0.5);
  animation: pulseRing 2.2s ease infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.7; }
  60%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Stop pulsing when open */
.float-contact.open .float-toggle::after {
  animation: none;
  opacity: 0;
}

@media (max-width: 480px) {
  .float-contact {
    bottom: 18px;
    right: 18px;
  }
  .float-toggle { width: 52px; height: 52px; }
  .float-item   { width: 44px; height: 44px; }
}
