/* ===== FLOATING CONTACT BUTTON ===== */
/* Theme-aware floating contact component with dual profile images */

.contact-float {
  position: fixed;
  z-index: 1030; /* Below modals (1055) but above navbar (1020) */
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(135deg, #ffd60a 0%, #ffc107 100%);
  border-radius: 50px;
  padding: 12px 24px 12px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, visibility 0.4s ease;
  text-decoration: none;
  color: #1a1a1a;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

/* Desktop: Bottom-right floating */
@media (min-width: 1200px) {
  .contact-float {
    bottom: 32px;
    right: 32px;
  }
}

/* Tablet: Bottom-right but smaller padding */
@media (min-width: 768px) and (max-width: 1199px) {
  .contact-float {
    bottom: 24px;
    right: 24px;
    font-size: 1rem;
    padding: 10px 20px 10px 16px;
  }
}

/* Mobile: Bottom-center banner anchored */
@media (max-width: 767px) {
  .contact-float {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 16px 24px;
    justify-content: center;
    font-size: 1rem;
  }
}

/* Hover effect (desktop only) */
@media (min-width: 768px) {
  .contact-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
    color: #000000;
  }
}

/* Text label */
.contact-float__text {
  margin-right: 16px;
  white-space: nowrap;
  color: inherit;
}

@media (max-width: 767px) {
  .contact-float__text {
    margin-right: 12px;
  }
}

/* Profile images container */
.contact-float__avatars {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

/* Individual avatar */
.contact-float__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #ffd60a;
  object-fit: cover;
  background: #ffffff;
}

@media (max-width: 767px) {
  .contact-float__avatar {
    width: 44px;
    height: 44px;
    border-width: 2px;
  }
}

/* Second avatar overlaps first */
.contact-float__avatar:nth-child(2) {
  margin-left: -12px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .contact-float {
    transition: none !important;
  }
  
  .contact-float:hover {
    transform: none !important;
  }
  
  .contact-float__tooltip {
    display: none !important;
  }
}

/* Animated tooltip messages */
.contact-float__tooltip {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden; /* Hide empty tooltip until content loads */
  animation: tooltipFadeInOut 3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tooltip arrow */
.contact-float__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
}

/* Mobile: Position tooltip above banner */
@media (max-width: 767px) {
  .contact-float__tooltip {
    bottom: calc(100% + 12px);
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}

/* Tooltip animation: Fade in, stay, fade out */
@keyframes tooltipFadeInOut {
  0% {
    opacity: 0;
    visibility: visible; /* Make visible when animation starts */
    transform: translateX(-50%) translateY(8px);
  }
  10% {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  90% {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    visibility: hidden; /* Hide again when animation ends */
    transform: translateX(-50%) translateY(-8px);
  }
}

/* Dark mode adjustments */
:root[data-bs-theme="dark"] .contact-float {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

:root[data-bs-theme="dark"] .contact-float:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

/* Ensure it doesn't overlap footer on very short viewports */
@media (max-height: 600px) and (max-width: 767px) {
  .contact-float {
    padding: 12px 20px;
  }
  
  .contact-float__avatar {
    width: 40px;
    height: 40px;
  }
}
