/* ==========================================================
   fixed-cta.css — دوك واتساب + اتصال (أسفل اليسار) + زر العودة للأعلى
   ========================================================== */
:root {
  --ebmnt1-fixed-cta-dock-background-color: var(--ebmnt1-color-glass-white);
  --ebmnt1-fixed-cta-dock-border-color: var(--ebmnt1-color-border-neutral);
  --ebmnt1-fixed-cta-dock-shadow-color: var(--ebmnt1-color-shadow);
  --ebmnt1-fixed-cta-pill-background-color: var(--ebmnt1-color-white);
  --ebmnt1-fixed-cta-pill-border-color: var(--ebmnt1-color-border-neutral);
  --ebmnt1-fixed-cta-text-color: var(--ebmnt1-color-secondary);
  --ebmnt1-fixed-cta-icon-color: var(--ebmnt1-color-white);
  --ebmnt1-fixed-cta-whatsapp-background-color: var(--ebmnt1-color-whatsapp);
  --ebmnt1-fixed-cta-whatsapp-pulse-color: rgba(37, 211, 102, 0.5);
  --ebmnt1-fixed-cta-call-background-color: var(--ebmnt1-color-secondary);
  --ebmnt1-fixed-cta-call-pulse-color: rgba(91, 87, 231, 0.45);
  --ebmnt1-fixed-cta-shine-color: rgba(91, 87, 231, 0.18);
  --ebmnt1-back-to-top-background-color: var(--ebmnt1-color-secondary);
  --ebmnt1-back-to-top-icon-color: var(--ebmnt1-color-white);
  --ebmnt1-back-to-top-hover-background-color: var(--ebmnt1-color-primary);
  --ebmnt1-back-to-top-border-color: var(--ebmnt1-color-border-on-dark);

  --ebmnt1-fixed-cta-offset: 0.75rem;
  --ebmnt1-fixed-cta-icon-size: 2.75rem;
  --ebmnt1-fixed-cta-z-index: 900;
}

.ebmnt1-fixed-cta {
  position: fixed;
  left: var(--ebmnt1-fixed-cta-offset);
  bottom: var(--ebmnt1-fixed-cta-offset);
  z-index: var(--ebmnt1-fixed-cta-z-index);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem;
  border: 1px solid var(--ebmnt1-fixed-cta-dock-border-color);
  border-radius: 2rem;
  background-color: var(--ebmnt1-fixed-cta-dock-background-color);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px var(--ebmnt1-fixed-cta-dock-shadow-color);
  animation: ebmnt1-fixed-cta-enter 0.8s 1.5s var(--ebmnt1-transition-easing) both;
  transition: opacity var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing),
    transform var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing);
}

.ebmnt1-fixed-cta.ebmnt1-is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1.5rem);
}

.ebmnt1-fixed-cta__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-inline-end: 1rem;
  overflow: hidden;
  border: 1px solid var(--ebmnt1-fixed-cta-pill-border-color);
  border-radius: var(--ebmnt1-radius-pill);
  background-color: var(--ebmnt1-fixed-cta-pill-background-color);
  font-size: var(--ebmnt1-font-size-label);
  font-weight: 700;
  color: var(--ebmnt1-fixed-cta-text-color);
  transition: transform var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing),
    box-shadow var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing);
}

.ebmnt1-fixed-cta__pill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  right: -60%;
  background-image: linear-gradient(105deg, transparent, var(--ebmnt1-fixed-cta-shine-color), transparent);
  transform: skewX(-20deg);
  transition: right 0.7s var(--ebmnt1-transition-easing);
}

.ebmnt1-fixed-cta__pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px var(--ebmnt1-fixed-cta-dock-shadow-color);
}

.ebmnt1-fixed-cta__pill:hover::after {
  right: 130%;
}

.ebmnt1-fixed-cta__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ebmnt1-fixed-cta-icon-size);
  height: var(--ebmnt1-fixed-cta-icon-size);
  border-radius: 50%;
  color: var(--ebmnt1-fixed-cta-icon-color);
  font-size: 1.25rem;
}

.ebmnt1-fixed-cta__pill--whatsapp .ebmnt1-fixed-cta__icon {
  background-color: var(--ebmnt1-fixed-cta-whatsapp-background-color);
  animation: ebmnt1-fixed-cta-pulse-whatsapp 2s ease-out infinite;
}

.ebmnt1-fixed-cta__pill--call .ebmnt1-fixed-cta__icon {
  background-color: var(--ebmnt1-fixed-cta-call-background-color);
  animation: ebmnt1-fixed-cta-pulse-call 2s 0.6s ease-out infinite;
}

.ebmnt1-fixed-cta__pill:hover .ebmnt1-fixed-cta__icon i {
  animation: ebmnt1-fixed-cta-wiggle 0.6s ease;
}

.ebmnt1-fixed-cta__label {
  display: inline-block;
  max-width: 10rem;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.4s var(--ebmnt1-transition-easing), opacity 0.3s var(--ebmnt1-transition-easing);
}

.ebmnt1-fixed-cta.ebmnt1-is-compact .ebmnt1-fixed-cta__pill {
  padding-inline-end: 0;
}

.ebmnt1-fixed-cta.ebmnt1-is-compact .ebmnt1-fixed-cta__label {
  max-width: 0;
  opacity: 0;
}

.ebmnt1-fixed-cta.ebmnt1-is-compact:hover .ebmnt1-fixed-cta__pill,
.ebmnt1-fixed-cta.ebmnt1-is-compact:focus-within .ebmnt1-fixed-cta__pill {
  padding-inline-end: 1rem;
}

.ebmnt1-fixed-cta.ebmnt1-is-compact:hover .ebmnt1-fixed-cta__label,
.ebmnt1-fixed-cta.ebmnt1-is-compact:focus-within .ebmnt1-fixed-cta__label {
  max-width: 10rem;
  opacity: 1;
}

/* ---------- Back to top ---------- */
.ebmnt1-back-to-top {
  position: fixed;
  right: var(--ebmnt1-fixed-cta-offset);
  bottom: var(--ebmnt1-fixed-cta-offset);
  z-index: var(--ebmnt1-fixed-cta-z-index);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--ebmnt1-back-to-top-background-color);
  color: var(--ebmnt1-back-to-top-icon-color);
  border: 1px solid var(--ebmnt1-back-to-top-border-color);
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing),
    transform var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing),
    background-color var(--ebmnt1-transition-duration) var(--ebmnt1-transition-easing);
}

.ebmnt1-back-to-top.ebmnt1-is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.ebmnt1-back-to-top:hover {
  background-color: var(--ebmnt1-back-to-top-hover-background-color);
}

@media (min-width: 768px) {
  :root {
    --ebmnt1-fixed-cta-offset: 1.25rem;
    --ebmnt1-fixed-cta-icon-size: 3rem;
  }

  .ebmnt1-fixed-cta {
    flex-direction: row;
    align-items: center;
  }
}

@keyframes ebmnt1-fixed-cta-enter {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ebmnt1-fixed-cta-pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 var(--ebmnt1-fixed-cta-whatsapp-pulse-color);
  }

  100% {
    box-shadow: 0 0 0 0.9rem transparent;
  }
}

@keyframes ebmnt1-fixed-cta-pulse-call {
  0% {
    box-shadow: 0 0 0 0 var(--ebmnt1-fixed-cta-call-pulse-color);
  }

  100% {
    box-shadow: 0 0 0 0.9rem transparent;
  }
}

@keyframes ebmnt1-fixed-cta-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-14deg);
  }

  75% {
    transform: rotate(14deg);
  }
}
