/* MARK: Floating contact stack and WhatsApp popup */

/* MARK: Phone + email floats, stacked above the WhatsApp button */
.site-contact-float {
  position: fixed;
  right: 1.375rem;
  z-index: 40;
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(3, 28, 63, 0.25);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.site-contact-float::before {
  width: 1.4rem;
  height: 1.4rem;
  content: "";
  background-color: #fff;
  -webkit-mask-image: var(--site-contact-icon);
  mask-image: var(--site-contact-icon);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.site-contact-float:hover,
.site-contact-float:focus-visible {
  transform: translateY(-3px) scale(1.03);
}

.site-contact-float--phone {
  bottom: 7.75rem;
  background: var(--calabash-company-orange-a11y);
}

.site-contact-float--phone:hover,
.site-contact-float--phone:focus-visible {
  background: var(--calabash-company-orange-a11y-dark);
}

.site-contact-float--email {
  bottom: 11.875rem;
  background: var(--calabash-navy);
}

.site-contact-float--email:hover,
.site-contact-float--email:focus-visible {
  background: var(--calabash-navy-dark);
}

/* MARK: WhatsApp float */
.site-whatsapp-float {
  position: fixed;
  z-index: 40;
  right: 1.375rem;
  bottom: 3rem;
  display: grid;
  width: 3.875rem;
  height: 3.875rem;
  padding: 0;
  place-items: center;
  color: #fff;
  background: #2fb344;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(3, 28, 63, 0.25);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.site-whatsapp-float:hover,
.site-whatsapp-float:focus-visible {
  color: #fff;
  background: #239537;
  transform: translateY(-3px) scale(1.03);
}

.site-whatsapp-float img {
  width: 2.125rem;
  height: 2.125rem;
  object-fit: contain;
}

/* MARK: WhatsApp popup */
.whatsapp-modal,
.whatsapp-modal *,
.whatsapp-modal *::before,
.whatsapp-modal *::after {
  box-sizing: border-box;
}

.whatsapp-modal {
  position: fixed;
  top: auto;
  left: auto;
  right: 1.375rem;
  bottom: 7.875rem;
  margin: 0;
  width: min(calc(100vw - 2.5rem), 23rem);
  max-height: calc(100vh - 9.5rem);
  padding: 1.75rem;
  overflow-y: auto;
  color: var(--calabash-text);
  background: var(--calabash-white);
  border: 0;
  border-radius: 0.875rem;
  box-shadow: var(--calabash-shadow-hover);
}

.whatsapp-modal::backdrop {
  background: rgba(6, 44, 79, 0.55);
}

.whatsapp-modal__form {
  position: relative;
}

.whatsapp-modal__close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--calabash-muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.whatsapp-modal__close:hover,
.whatsapp-modal__close:focus-visible {
  color: var(--calabash-text);
  background: var(--calabash-light-grey);
}

.whatsapp-modal__title {
  margin: 0 0 0.4rem;
  color: var(--calabash-navy);
  font-size: 1.35rem;
  font-weight: 800;
}

.whatsapp-modal__intro {
  margin: 0 0 1.25rem;
  color: var(--calabash-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.whatsapp-modal__field {
  margin-bottom: 1rem;
}

.whatsapp-modal__field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 650;
}

.whatsapp-modal__field input,
.whatsapp-modal__field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  color: var(--calabash-navy);
  background: var(--calabash-white);
  border: 1px solid var(--calabash-border);
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.95rem;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.whatsapp-modal__field textarea {
  resize: vertical;
}

.whatsapp-modal__field input:focus,
.whatsapp-modal__field textarea:focus {
  border-color: var(--calabash-company-turquoise);
  box-shadow: 0 0 0 3px var(--calabash-turquoise-12);
  outline: none;
}

.whatsapp-modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  min-height: 3rem;
  color: #fff;
  background: #2fb344;
  border: 0;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.whatsapp-modal__submit:hover,
.whatsapp-modal__submit:focus-visible {
  background: #239537;
  transform: translateY(-2px);
}

.whatsapp-modal__submit-arrow {
  font-size: 1.3em;
  line-height: 1;
}

/* MARK: Phone popover */
.site-contact-popover,
.site-contact-popover *,
.site-contact-popover *::before,
.site-contact-popover *::after {
  box-sizing: border-box;
}

.site-contact-popover {
  position: fixed;
  z-index: 41;
  top: auto;
  left: auto;
  right: 5.5rem;
  bottom: 7.75rem;
  width: min(17rem, calc(100vw - 7rem));
  max-height: calc(100vh - 9.5rem);
  margin: 0;
  padding: 1.25rem;
  overflow-y: auto;
  color: var(--calabash-text);
  background: var(--calabash-white);
  border: 0;
  border-radius: 0.875rem;
  box-shadow: var(--calabash-shadow-hover);
}

.site-contact-popover__title {
  margin: 0;
  color: var(--calabash-navy);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}

.site-contact-popover__title::after {
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 10px;
  content: "";
  background: var(--calabash-company-turquoise);
}

.site-contact-popover__intro {
  margin: 0.75rem 0 0;
  color: var(--calabash-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-contact-popover__number {
  margin: 0.25rem 0 1rem;
  color: var(--calabash-navy);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
}

.site-contact-popover .site-contact-popover__copy {
  width: 100%;
}

.site-contact-popover .site-contact-popover__copy:focus-visible {
  outline-color: var(--calabash-navy);
}

.site-contact-popover__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  border: 0;
}

@media (max-width: 32rem) {
  .site-whatsapp-float {
    right: 0.875rem;
    bottom: 2rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  .site-contact-float {
    right: 0.875rem;
    width: 2.9rem;
    height: 2.9rem;
  }

  .site-contact-float--phone {
    bottom: 6.375rem;
  }

  .site-contact-float--email {
    bottom: 9.875rem;
  }

  .whatsapp-modal {
    right: 0.875rem;
    bottom: 6.5rem;
    width: min(calc(100vw - 1.75rem), 21rem);
  }

  .site-contact-popover {
    right: 4.5rem;
    bottom: 6.375rem;
    width: min(16rem, calc(100vw - 5.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-whatsapp-float,
  .site-contact-float,
  .site-contact-popover .site-contact-popover__copy,
  .whatsapp-modal__close,
  .whatsapp-modal__submit,
  .whatsapp-modal__field input,
  .whatsapp-modal__field textarea {
    transition: none;
  }
}
