/* Sales Desk Widget - Social Media Fixed Buttons */
.sales-desk-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 56px;
  min-height: 56px;
  align-items: flex-end;
}

/* Hover area - always visible but transparent */
.sales-desk-widget::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  min-width: 56px;
  min-height: 56px;
}

/* Indicator Button - Always Visible, sits above Back to Top */
.sales-desk-widget-indicator {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
  animation: pulse 2s ease-in-out infinite;
  order: 999;
  position: relative;
  z-index: 10;
}

.sales-desk-widget-indicator i {
  font-size: 24px;
  transition: all 0.3s ease;
}

/* Tooltip for indicator - Show only when hover or active */
.sales-desk-widget-indicator::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 75px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

/* Show tooltip when hover or active */
.sales-desk-widget-indicator:hover::before,
.sales-desk-widget.active .sales-desk-widget-indicator::before {
  opacity: 1;
  visibility: visible;
}

/* Arrow for indicator tooltip */
.sales-desk-widget-indicator::after {
  content: '';
  position: absolute;
  right: 65px;
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Show arrow when hover or active */
.sales-desk-widget-indicator:hover::after,
.sales-desk-widget.active .sales-desk-widget-indicator::after {
  opacity: 1;
  visibility: visible;
}

/* Icon switching */
.sales-desk-widget-icon-close {
  display: none;
  position: absolute;
}

.sales-desk-widget-icon-open {
  display: block;
}

/* Show X icon on hover or active */
.sales-desk-widget-indicator:hover .sales-desk-widget-icon-open,
.sales-desk-widget.active .sales-desk-widget-icon-open {
  display: none;
}

.sales-desk-widget-indicator:hover .sales-desk-widget-icon-close,
.sales-desk-widget.active .sales-desk-widget-icon-close {
  display: block;
}

/* Stop pulse animation when active */
.sales-desk-widget.active .sales-desk-widget-indicator {
  animation: none;
}

/* Pulse animation for indicator */
@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(102, 126, 234, 0.7);
  }

  50% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(102, 126, 234, 0);
  }
}

.sales-desk-widget-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  bottom: 0;
  right: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Show buttons on hover - slide up from bottom */
.sales-desk-widget:hover .sales-desk-widget-btn,
.sales-desk-widget.active .sales-desk-widget-btn {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Do NOT expand social buttons while hovering the Back to Top button */
.sales-desk-widget.suppress-expand .sales-desk-widget-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  position: absolute !important;
  animation: none !important;
}

/* Individual button hover effect */
.sales-desk-widget-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  color: #fff;
  text-decoration: none;
}

.sales-desk-widget-btn i {
  font-size: 28px;
}

/* Social Media Brand Colors */
.sales-desk-widget-btn.facebook {
  background: linear-gradient(135deg, #3b5998 0%, #1e3a70 100%);
}

.sales-desk-widget-btn.line {
  background: linear-gradient(135deg, #00c300 0%, #009900 100%);
}

.sales-desk-widget-btn.youtube {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.sales-desk-widget-btn.instagram {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.sales-desk-widget-btn.tiktok {
  background: linear-gradient(135deg, #010101 0%, #333333 100%);
}

/* Tooltip on hover */
.sales-desk-widget-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 70px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

.sales-desk-widget-btn:hover::before {
  opacity: 1;
  visibility: visible;
  right: 75px;
}

/* Arrow for tooltip */
.sales-desk-widget-btn::after {
  content: '';
  position: absolute;
  right: 60px;
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.sales-desk-widget-btn:hover::after {
  opacity: 1;
  visibility: visible;
  right: 65px;
}

/* Stagger animation delays for buttons sliding up - Optimized for mobile */
.sales-desk-widget:hover .sales-desk-widget-btn:nth-child(1),
.sales-desk-widget.active .sales-desk-widget-btn:nth-child(1) {
  transition-delay: 0s;
  animation: slideUpButton 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0s;
}

.sales-desk-widget:hover .sales-desk-widget-btn:nth-child(2),
.sales-desk-widget.active .sales-desk-widget-btn:nth-child(2) {
  transition-delay: 0.06s;
  animation: slideUpButton 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.06s;
}

.sales-desk-widget:hover .sales-desk-widget-btn:nth-child(3),
.sales-desk-widget.active .sales-desk-widget-btn:nth-child(3) {
  transition-delay: 0.12s;
  animation: slideUpButton 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.12s;
}

.sales-desk-widget:hover .sales-desk-widget-btn:nth-child(4),
.sales-desk-widget.active .sales-desk-widget-btn:nth-child(4) {
  transition-delay: 0.18s;
  animation: slideUpButton 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.18s;
}

.sales-desk-widget:hover .sales-desk-widget-btn:nth-child(5),
.sales-desk-widget.active .sales-desk-widget-btn:nth-child(5) {
  transition-delay: 0.24s;
  animation: slideUpButton 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.24s;
}

/* Slide up animation with GPU acceleration */
/* @keyframes slideUpButton {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
} */

/* Back to Top Button - Always at Bottom, shows on scroll */
.sales-desk-widget-backtotop {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: #0033A2;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  order: 1000;
  position: relative;
  z-index: 10;
  animation: pulseBlue 2s ease-in-out infinite;
}

/* Shown after user scrolls down */
.sales-desk-widget-backtotop.is-visible {
  display: flex;
  opacity: 1;
}

/* Pulse animation for back to top (brand-blue tinted, mirrors indicator) */
@keyframes pulseBlue {

  0%,
  100% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(0, 51, 162, 0.7);
  }

  50% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(0, 51, 162, 0);
  }
}

.sales-desk-widget-backtotop i {
  font-size: 24px;
}

/* Back to top: no hover lift/shadow effect (keeps idle pulse only) */

/* NOTE: Back to top intentionally has NO CSS tooltip (::before/::after) to
   avoid a duplicate/second tooltip box. Accessibility is covered by aria-label. */
