/* Floating Contact Buttons Container */
.canopy-contact-container {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 999999;
}

/* Individual Social Button */
.canopy-social-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  outline: none;
  border: none;
}

/* SVG Icon alignment */
.canopy-social-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Hover effects */
.canopy-social-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

/* Hover Wave/Ripple effect (Sóng tràn) */
.canopy-social-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  z-index: -1;
  opacity: 0;
  transform: scale(1);
}

.canopy-social-btn:hover::before {
  animation: canopy-ripple 1.2s infinite ease-out;
}

@keyframes canopy-ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Shaking effect (Rung lắc định kỳ) */
.canopy-social-btn {
  animation: canopy-shake 6s infinite ease-in-out;
}

/* Staggered shake animation delays for a natural flow */
.canopy-social-btn:nth-child(1) { animation-delay: 0s; }
.canopy-social-btn:nth-child(2) { animation-delay: 1s; }
.canopy-social-btn:nth-child(3) { animation-delay: 2s; }
.canopy-social-btn:nth-child(4) { animation-delay: 3s; }
.canopy-social-btn:nth-child(5) { animation-delay: 4s; }

@keyframes canopy-shake {
  0%, 88%, 100% {
    transform: rotate(0deg) scale(1);
  }
  90% {
    transform: rotate(10deg) scale(1.05);
  }
  92% {
    transform: rotate(-10deg) scale(1.05);
  }
  94% {
    transform: rotate(10deg) scale(1.05);
  }
  96% {
    transform: rotate(-10deg) scale(1.05);
  }
  98% {
    transform: rotate(0deg) scale(1.05);
  }
}

/* Individual Brand Colors */
.canopy-btn-phone {
  background: #25d366;
}
.canopy-btn-zalo {
  background: #0068ff;
}
.canopy-btn-shopee {
  background: #ee4d2d;
}
.canopy-btn-facebook {
  background: #1877f2;
}
.canopy-btn-tiktok {
  background: #010101;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 
              0 0 2px rgba(254, 44, 85, 0.5), 
              0 0 2px rgba(37, 244, 238, 0.5);
}

/* Tooltip on Hover */
.canopy-social-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.canopy-social-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Responsive adjustment for small screens */
@media (max-width: 480px) {
  .canopy-contact-container {
    right: 10px;
    gap: 10px;
  }
  .canopy-social-btn {
    width: 42px;
    height: 42px;
  }
  .canopy-social-btn svg {
    width: 20px;
    height: 20px;
  }
  .canopy-social-btn::after {
    display: none; /* Hide tooltips on mobile to save space */
  }
}

/* Footer Custom Social Icons */
.canopy-footer-socials {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.canopy-footer-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.canopy-footer-social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.canopy-footer-social-icon.f-fb { background: #1877f2; }
.canopy-footer-social-icon.f-zl { background: #0068ff; }
.canopy-footer-social-icon.f-tt { background: #010101; }
.canopy-footer-social-icon.f-sp { background: #ee4d2d; }
.canopy-footer-social-icon.f-ph { background: #25d366; }

/* Responsive adjustments for Footer grid & full width */
@media (min-width: 850px) {
  /* Expand footer container width to full size (max 1620px) */
  #footer .container {
    max-width: 1620px !important;
    width: 95% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Custom grid columns distribution (4 - 2 - 2 - 4) */
  #footer .row > .col:nth-child(1) {
    width: 33.333% !important;
    max-width: 33.333% !important;
    flex-basis: 33.333% !important;
  }
  #footer .row > .col:nth-child(2) {
    width: 16.666% !important;
    max-width: 16.666% !important;
    flex-basis: 16.666% !important;
  }
  #footer .row > .col:nth-child(3) {
    width: 16.666% !important;
    max-width: 16.666% !important;
    flex-basis: 16.666% !important;
  }
  #footer .row > .col:nth-child(4) {
    width: 33.333% !important;
    max-width: 33.333% !important;
    flex-basis: 33.333% !important;
  }
}
