/**
 * Floating Contact Button Widget Styles
 * 
 * Provides responsive contact button functionality:
 * - Desktop: Floating button with tooltip (bottom right)
 * - Mobile: 3-button action bar at bottom
 * 
 * @package HelloElementorChild
 */

/* ========================================
   DESKTOP FLOATING BUTTON (768px+)
   ======================================== */

.floating-contact-wrapper {
  position: fixed;
  bottom: 75px; /* 10px (chat offset) + 55px (chat height) + 10px (gap) */
  right: 10px;
  z-index: 9998; /* Below chat button but above other content */
  display: none;
}

@media (min-width: 768px) {
  .floating-contact-wrapper {
    display: block;
  }
}

.floating-contact-desktop {
  width: 64px;
  height: 64px;
  border-radius: 50% !important;
  background: #961F61;
  border: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(150, 31, 97, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.floating-contact-desktop:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(150, 31, 97, 0.4), 0 3px 8px rgba(0, 0, 0, 0.15);
  opacity: 0.9;
}

.floating-contact-desktop:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.floating-contact-desktop .floating-icon {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  stroke-width: 2.5;
}

/* Tooltip */
.floating-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.floating-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.85);
}

.floating-contact-desktop:hover .floating-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* ========================================
   MOBILE ACTION BAR (<768px)
   ======================================== */

.floating-contact-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.75rem 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  display: block;
}

@media (min-width: 768px) {
  .floating-contact-mobile {
    display: none;
  }
}

.action-bar-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  border-radius: 0.75rem; /* All buttons have same radius */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 64px;
  border: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(231, 119, 178, 0.2);
  touch-action: manipulation;
}

.call-button {
  background: #E777B2;
  color: #FFFFFF;
  border-radius: 0.75rem;
}

.whatsapp-button {
  background: #E8F7ED;
  color: #25D366;
  border-radius: 0.75rem;
}

.booking-button {
  background: #961F61;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(150, 31, 97, 0.3);
  border-radius: 0.75rem !important;
}

.action-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.call-icon-wrapper {
  background: #FFFFFF33;
}

.whatsapp-icon-wrapper {
  background: #25d36626;
}

.booking-icon-wrapper {
  background: #FFFFFF33;
}

.action-icon {
  width: 20px;
  height: 20px;
  color: inherit;
}

.action-icon.whatsapp-icon,
.whatsapp-icon {
  width: 22px;
  height: 22px;
  fill: #25D366;
}

.call-button .action-icon {
  color: #FFFFFF;
  stroke: #FFFFFF;
}

.booking-button .action-icon {
  color: #FFFFFF;
  stroke: #FFFFFF;
}

.action-label {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* Hover States */
.action-button:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

@media (hover: hover) {
  .call-button:hover {
    opacity: 0.85;
  }

  .call-button:hover .call-icon-wrapper {
    transform: scale(1.05);
  }

  .whatsapp-button:hover {
    opacity: 0.85;
  }

  .whatsapp-button:hover .whatsapp-icon-wrapper {
    transform: scale(1.05);
  }

  .booking-button:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(150, 31, 97, 0.4);
    transform: translateY(-1px);
  }

  .booking-button:hover .booking-icon-wrapper {
    transform: scale(1.05);
  }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Extra Small Devices */
@media (max-width: 374px) {
  .action-bar-container {
    gap: 0.375rem;
  }

  .action-button {
    padding: 0.625rem 0.375rem;
    min-height: 60px;
    gap: 0.25rem;
  }

  .action-icon-wrapper {
    width: 36px !important;
    height: 36px !important;
  }

  .action-icon {
    width: 18px !important;
    height: 18px !important;
  }

  .whatsapp-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .action-label {
    font-size: 0.625rem !important;
  }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
  .action-bar-container {
    gap: 0.75rem;
  }

  .action-button {
    padding: 0.875rem 0.75rem;
    min-height: 72px;
    gap: 0.5rem;
  }

  .action-icon-wrapper {
    width: 44px !important;
    height: 44px !important;
  }

  .action-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .whatsapp-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .action-label {
    font-size: 0.75rem !important;
  }
}

/* Large Desktop - Adjust floating button position */
@media (min-width: 1440px) {
  .floating-contact-wrapper {
    right: 10px; /* Keep consistent with chat button positioning */
  }

  .floating-contact-desktop {
    width: 72px;
    height: 72px;
  }

  .floating-contact-desktop .floating-icon {
    width: 32px;
    height: 32px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus States */
.floating-contact-desktop:focus-visible,
.action-button:focus-visible {
  outline: 3px solid #961F61;
  outline-offset: 3px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .floating-contact-desktop,
  .action-button,
  .action-icon-wrapper,
  .floating-tooltip {
    transition: none;
    animation: none;
  }
}

@media (max-width: 768px) {
  .seasonal-float-img,.zsiq-float {
    bottom: 117px !important;
  }
}
