/* =============================================================================
   FLOATING "GET A QUOTE" BUTTON (FAB)
   =============================================================================
   Compiled from scsss/_floating-quote-btn.scss
   A fixed, animated CTA anchored bottom-right. Three animation layers:
     1. Entrance slide-up   2. Pulsing glow ring   3. Icon wiggle
   ========================================================================== */

/* KEYFRAMES ---------------------------------------------------------------- */

@keyframes fqbEntrance {
  0%   { opacity: 0; transform: translateY(60px) scale(0.8); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fqbPulse {
  0%   { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes fqbWiggle {
  0%, 100% { transform: rotate(0deg); }
  15%      { transform: rotate(-12deg); }
  30%      { transform: rotate(10deg); }
  45%      { transform: rotate(-8deg); }
  60%      { transform: rotate(4deg); }
  75%      { transform: rotate(-2deg); }
}

@keyframes fqbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* BUTTON BASE -------------------------------------------------------------- */

.floating-quote-btn {
  /* Positioning */
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1040;

  /* Layout */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  text-decoration: none !important;

  /* Colours — ACR brand */
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  color: #e0a858 !important;
  border: 1.5px solid rgba(224, 168, 88, 0.3);
  border-radius: 50px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(224, 168, 88, 0.0),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;

  /* Entrance animation */
  opacity: 0;
  animation: fqbEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards,
             fqbFloat 3s ease-in-out 2s infinite;

  /* Smooth hover transitions */
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

/* HOVER -------------------------------------------------------------------- */

.floating-quote-btn:hover {
  transform: translateY(-3px) scale(1.04);
  background: linear-gradient(135deg, #3a3a3a 0%, #232323 100%);
  border-color: rgba(224, 168, 88, 0.6);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(224, 168, 88, 0.25);
  color: #f0c078 !important;
}

.floating-quote-btn:hover .fqb-icon i {
  animation: fqbWiggle 0.6s ease-in-out;
}

.floating-quote-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.floating-quote-btn:focus-visible {
  outline: 2px solid #e0a858;
  outline-offset: 3px;
}

/* PULSE RING --------------------------------------------------------------- */

.floating-quote-btn .fqb-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(224, 168, 88, 0.5);
  animation: fqbPulse 4s cubic-bezier(0.4, 0, 0.2, 1) 2s infinite;
  pointer-events: none;
}

/* ICON --------------------------------------------------------------------- */

.floating-quote-btn .fqb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.floating-quote-btn .fqb-icon i {
  animation: fqbWiggle 0.8s ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: 6s;
}

/* LABEL -------------------------------------------------------------------- */

.floating-quote-btn .fqb-label {
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1;
}

/* SCROLL-TO-TOP OFFSET ----------------------------------------------------- */

body:has(.floating-quote-btn) .scroll-to-top {
  bottom: 140px;
}

/* RESPONSIVE --------------------------------------------------------------- */

/* Tablet */
@media (max-width: 991px) {
  .floating-quote-btn {
    padding: 12px 20px;
    gap: 8px;
    bottom: 24px;
    right: 20px;
  }

  .floating-quote-btn .fqb-label {
    font-size: 0.85rem;
  }
}

/* Mobile – icon-only circle */
@media (max-width: 575px) {
  .floating-quote-btn {
    width: 54px;
    height: 54px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    bottom: 20px;
    right: 16px;
  }

  .floating-quote-btn .fqb-icon {
    font-size: 1.25rem;
  }

  .floating-quote-btn .fqb-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* REDUCED MOTION ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .floating-quote-btn {
    animation: none !important;
    opacity: 1;
  }

  .floating-quote-btn .fqb-pulse-ring {
    animation: none !important;
    display: none;
  }

  .floating-quote-btn .fqb-icon i {
    animation: none !important;
  }
}
