/* Premium floating WhatsApp CTA — Magoven studio pages */
.mg-wa-float {
  --mg-wa-green: #25d366;
  --mg-wa-green-dk: #1da851;
  position: fixed;
  z-index: 76;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  color: #f4fff8;
  text-decoration: none;
  font: 500 15px/1.1 "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, rgba(22, 24, 22, 0.94) 0%, rgba(10, 10, 9, 0.96) 100%);
  border: 1px solid rgba(246, 195, 2, 0.22);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 32px rgba(37, 211, 102, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translate3d(0, 0, 0);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 0.45s cubic-bezier(0.2, 0.7, 0.1, 1), border-color 0.35s ease;
  isolation: isolate;
}

.mg-wa-float::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 120deg, rgba(37, 211, 102, 0.45), rgba(246, 195, 2, 0.35), rgba(37, 211, 102, 0.2), transparent 70%);
  z-index: -2;
  opacity: 0.55;
  filter: blur(8px);
}

.mg-wa-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35);
  animation: mg-wa-pulse 2.8s ease-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes mg-wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.mg-wa-float__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--mg-wa-green) 0%, var(--mg-wa-green-dk) 100%);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.mg-wa-float__icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.mg-wa-float__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 14px;
  text-align: left;
}

.mg-wa-float__title {
  font-weight: 600;
  font-size: 14px;
  color: #eeebe3;
}

.mg-wa-float__sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(238, 235, 227, 0.62);
}

@media (hover: hover) and (pointer: fine) {
  .mg-wa-float:hover {
    transform: translateY(-3px);
    border-color: rgba(246, 195, 2, 0.42);
    box-shadow:
      0 12px 36px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(37, 211, 102, 0.18);
  }
  .mg-wa-float:hover .mg-wa-float__icon {
    transform: scale(1.04);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1);
  }
}

.mg-wa-float:focus-visible {
  outline: 2px solid #f6c302;
  outline-offset: 4px;
}

@media (max-width: 520px) {
  .mg-wa-float__copy {
    display: none;
  }
  .mg-wa-float {
    padding: 5px;
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-wa-float__pulse {
    animation: none;
  }
  .mg-wa-float {
    transition: none;
  }
}

/* Keep clear of mobile drawer / mega menu when open */
html.mg-wa-float-hide .mg-wa-float {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
