/* fixed call-to-action: bottom-left of the viewport (physical left, even in RTL) */
.ebmnt1-cta-fixed {
  position: fixed;
  left: 1em;
  bottom: 1em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75em;
  z-index: var(--ebmnt1-cta-fixed-z-index);
}

/* hide while the aside menu is open */
.ebmnt1-header.is-menu-open ~ .ebmnt1-cta-fixed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ebmnt1-cta-fixed {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.ebmnt1-cta-fixed__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--ebmnt1-font-size-button);
  font-weight: var(--ebmnt1-font-weight-bold);
  line-height: 1.2;
  border: 1px solid var(--ebmnt1-cta-fixed-border-color);
  border-radius: var(--ebmnt1-radius-pill);
  padding: 0.4em 1.1em 0.4em 0.45em;
  box-shadow: 0 0.6em 1.4em var(--ebmnt1-cta-fixed-shadow-color);
  transition: var(--ebmnt1-transition-base);
}

.ebmnt1-cta-fixed__button:hover {
  transform: translateY(-0.2em) scale(1.03);
}

.ebmnt1-cta-fixed__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6em;
  aspect-ratio: 1;
  border-radius: var(--ebmnt1-radius-circle);
  font-size: 1.15em;
}

/* pulse ring */
.ebmnt1-cta-fixed__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--ebmnt1-radius-circle);
  box-shadow: 0 0 0 0 var(--ebmnt1-cta-pulse-color);
  animation: ebmnt1-cta-pulse 2s infinite;
}

.ebmnt1-cta-fixed__label {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  max-width: 14em;
  transition: max-width 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

.ebmnt1-cta-fixed__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.7em;
  font-weight: var(--ebmnt1-font-weight-medium);
  opacity: 0.85;
}

.ebmnt1-cta-fixed__status::before {
  content: '';
  width: 0.55em;
  aspect-ratio: 1;
  border-radius: var(--ebmnt1-radius-circle);
  background-color: var(--ebmnt1-cta-fixed-status-dot-color);
  animation: ebmnt1-cta-blink 1.4s infinite;
}

.ebmnt1-cta-fixed__button--whatsapp {
  color: var(--ebmnt1-cta-fixed-whatsapp-text-color);
  background-color: var(--ebmnt1-cta-fixed-whatsapp-bg-color);
  --ebmnt1-cta-pulse-color: var(--ebmnt1-cta-fixed-whatsapp-pulse-color);
}

.ebmnt1-cta-fixed__button--whatsapp .ebmnt1-cta-fixed__icon {
  color: var(--ebmnt1-cta-fixed-whatsapp-icon-color);
  background-color: var(--ebmnt1-cta-fixed-whatsapp-icon-bg-color);
}

.ebmnt1-cta-fixed__button--call {
  color: var(--ebmnt1-cta-fixed-call-text-color);
  background-color: var(--ebmnt1-cta-fixed-call-bg-color);
  --ebmnt1-cta-pulse-color: var(--ebmnt1-cta-fixed-call-pulse-color);
}

.ebmnt1-cta-fixed__button--call .ebmnt1-cta-fixed__icon {
  color: var(--ebmnt1-cta-fixed-call-icon-color);
  background-color: var(--ebmnt1-cta-fixed-call-icon-bg-color);
}

/* smart behaviour: collapse to icon only while scrolling down */
.ebmnt1-cta-fixed.is-compact .ebmnt1-cta-fixed__label {
  max-width: 0;
  opacity: 0;
}

.ebmnt1-cta-fixed.is-compact .ebmnt1-cta-fixed__button {
  gap: 0;
  padding-inline-end: 0.45em;
}

.ebmnt1-cta-fixed.is-compact .ebmnt1-cta-fixed__button:hover .ebmnt1-cta-fixed__label {
  max-width: 14em;
  opacity: 1;
}

.ebmnt1-cta-fixed.is-compact .ebmnt1-cta-fixed__button:hover {
  gap: 0.7em;
  padding-inline-end: 1.1em;
}

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

  70% {
    box-shadow: 0 0 0 0.8em transparent;
  }

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

@keyframes ebmnt1-cta-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

@media (min-width: 768px) {
  .ebmnt1-cta-fixed {
    left: 1.5em;
    bottom: 1.5em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ebmnt1-cta-fixed__icon::after,
  .ebmnt1-cta-fixed__status::before {
    animation: none;
  }
}
