:root {
  --ivy-whatsapp-size: 56px;
  --landing-whatsapp-size: 84px;
  --landing-whatsapp-icon-size: 60px;
  --ivy-contact-gap: 10px;
}

.ivy-contact-stack {
  position: fixed;
  z-index: 99;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  max-width: calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
  font-family: Arial, sans-serif;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0s;
}

.ivy-contact-stack.is-hero-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.ivy-whatsapp-float {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ivy-contact-gap);
  max-width: 100%;
  color: #17130d;
  direction: ltr;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.2s ease;
}

.ivy-whatsapp-float__label {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  min-height: 44px;
  max-width: min(190px, calc(100vw - var(--landing-whatsapp-size) - 54px));
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(120, 91, 43, 0.27);
  border-radius: 14px;
  background: #fffaf0;
  box-shadow: inset 0 1px #fff, 0 10px 24px rgba(35, 22, 8, 0.2);
  color: #211b13;
  direction: rtl;
  font-size: clamp(0.86rem, 1.4vw, 1rem);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.ivy-whatsapp-float__label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  width: 11px;
  height: 11px;
  border-top: 1px solid rgba(120, 91, 43, 0.27);
  border-right: 1px solid rgba(120, 91, 43, 0.27);
  background: #fffaf0;
  transform: translateY(-50%) rotate(45deg);
}

.ivy-whatsapp-float__icon {
  box-sizing: border-box;
  display: grid;
  width: var(--ivy-whatsapp-size);
  min-width: var(--ivy-whatsapp-size);
  height: var(--ivy-whatsapp-size);
  min-height: var(--ivy-whatsapp-size);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: #168c4a;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 12px 28px rgba(4, 80, 40, 0.35);
  transition: background-color 0.2s ease;
}

.ivy-whatsapp-float__icon img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ivy-whatsapp-float--main .ivy-whatsapp-float__icon {
  width: var(--landing-whatsapp-size);
  min-width: var(--landing-whatsapp-size);
  height: var(--landing-whatsapp-size);
  min-height: var(--landing-whatsapp-size);
}

.ivy-whatsapp-float--main .ivy-whatsapp-float__icon img {
  width: var(--landing-whatsapp-icon-size);
  height: var(--landing-whatsapp-icon-size);
}

.ivy-whatsapp-float:hover {
  transform: translateY(-2px);
}

.ivy-whatsapp-float:hover .ivy-whatsapp-float__icon {
  background: #1b9d55;
}

.ivy-whatsapp-float:active {
  transform: translateY(1px);
}

.ivy-whatsapp-float:active .ivy-whatsapp-float__icon {
  background: #11733c;
}

.ivy-whatsapp-float:focus-visible {
  border-radius: 18px;
  outline: 3px solid #f2cc66;
  outline-offset: 4px;
}

.site-footer {
  padding-bottom: max(9rem, calc(env(safe-area-inset-bottom) + 8rem)) !important;
}

@media (max-width: 600px), (max-height: 600px) {
  .ivy-contact-stack {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    max-width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }

  .ivy-whatsapp-float__label {
    max-width: min(160px, calc(100vw - var(--landing-whatsapp-size) - 46px));
    padding-inline: 0.7rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 350px) {
  .ivy-whatsapp-float__label {
    max-width: 146px;
    padding-inline: 0.58rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ivy-contact-stack,
  .ivy-contact-stack.is-hero-hidden,
  .ivy-whatsapp-float,
  .ivy-whatsapp-float__icon {
    transform: none !important;
    transition: none !important;
  }
}
