/* ==========================================================================
   Floating Call + WhatsApp buttons (frontend_layout.php)
   Bottom-LEFT stack, mirroring the scroll-to-top button on the right
   (same 46px circle, 24px/20px edge offsets). On mobile (≤640px) the Apply
   tab moves to bottom-right, so this stack stays bottom-left, raised to sit
   just above the Apply tab's row (44px circles).
   z-index sits below the Apply tab (999999), scroll-top (999998) and the
   modals/popups so those always cover it.
   ========================================================================== */

.float-contact {
  position: fixed;
  left: 20px;
  bottom: 24px;
  z-index: 999990;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.float-contact-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.float-contact-btn:hover,
.float-contact-btn:focus-visible {
  color: #ffffff;
  transform: translateY(-3px);
  filter: brightness(1.06);
  outline: none;
}

.float-contact-btn:focus-visible {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(12, 124, 252, 0.55);
}

.float-contact-btn:active {
  transform: translateY(-1px);
}

/* Call — site theme blue (same gradient as scroll-top / Apply tab) */
.float-contact-call {
  background: linear-gradient(135deg, #0c7cfc 0%, #1e90ff 100%);
}

.float-contact-call:hover {
  box-shadow: 0 8px 26px rgba(12, 124, 252, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* WhatsApp — brand green */
.float-contact-wa {
  background: linear-gradient(135deg, #25d366 0%, #1ebe5b 100%);
  font-size: 1.45rem;
}

.float-contact-wa:hover {
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.5), 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Soft attention ring on WhatsApp */
.float-contact-wa::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: floatContactPulse 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes floatContactPulse {
  0%   { transform: scale(1);    opacity: 0.9; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Desktop hover label that slides out to the right */
.float-contact-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translate(-6px, -50%);
  padding: 6px 12px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-primary, 'Poppins', sans-serif);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.float-contact-btn:hover .float-contact-label,
.float-contact-btn:focus-visible .float-contact-label {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

/* Mobile: sit just above the Apply tab's row (Apply is bottom: 22px; right: 14px) */
@media (max-width: 640px) {
  .float-contact {
    left: 14px;
    bottom: 70px;
    gap: 16px;
  }

  .float-contact-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .float-contact-wa {
    font-size: 1.35rem;
  }

  .float-contact-label {
    display: none;
  }
}

/* Very small screens: keep it compact */
@media (max-width: 360px) {
  .float-contact {
    left: 10px;
    bottom: 64px;
    gap: 12px;
  }

  .float-contact-btn {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-contact-btn {
    transition: none;
  }
  .float-contact-wa::after {
    animation: none;
    display: none;
  }
}

@media print {
  .float-contact {
    display: none;
  }
}
