/* International site: email below the existing, unchanged chat launcher. */
body.hl-intl-email-ready {
  --hl-intl-email-bottom: 20px;
}

/* Also outrank the original desktop quote-button offset in chat-position.css. */
body.hl-intl-email-ready,
body.hl-intl-email-ready:has(#hl-cta-fab) {
  --hl-intl-chat-bottom: calc(var(--hl-intl-email-bottom) + 52px);
}

body.hl-intl-email-ready #hl-email-action {
  box-sizing: border-box;
  position: fixed;
  top: auto;
  left: auto;
  right: var(--hl-intl-chat-right, 20px);
  bottom: var(--hl-intl-email-bottom);
  z-index: 9997;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 112px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 6px;
  background: #004eb0;
  color: #fff;
  box-shadow: 0 3px 12px rgb(10 39 68 / 18%);
  font: 600 13px/18px Arial, "DM Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

body.hl-intl-email-ready #hl-email-action:hover {
  background: #003f90;
  color: #fff;
}

body.hl-intl-email-ready #hl-email-action:focus-visible {
  outline: 3px solid #eeac2d;
  outline-offset: 3px;
}

body.hl-intl-email-ready #hl-email-action[hidden] {
  display: none;
}

body.hl-intl-email-ready #hl-email-action .hl-email-icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

body.hl-intl-email-ready #hl-email-action .hl-email-label {
  font: inherit;
  white-space: nowrap;
}

body.hl-intl-email-ready #hl-email-action .hl-email-short { display: none; }
.quote-contact .hl-email-contact { overflow-wrap: anywhere; }
.topbar .hl-email-top { color: inherit; margin-left: 12px; text-decoration: none; white-space: nowrap; }

@media (min-width: 901px) {
  body.hl-intl-email-ready:has(#hl-cta-fab) {
    --hl-intl-email-bottom: 88px;
  }
}

@media (max-width: 900px) {
  body.hl-intl-email-ready {
    --hl-intl-email-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    --hl-intl-email-lane: max(80px, calc(68px + var(--hl-intl-chat-right, max(12px, env(safe-area-inset-right, 0px)))));
  }

  body.hl-intl-email-ready #hl-email-action {
    right: var(--hl-intl-chat-right, max(12px, env(safe-area-inset-right, 0px)));
    flex-direction: column;
    gap: 2px;
    width: 60px;
    padding: 4px;
    font-size: 11px;
    line-height: 12px;
  }

  body.hl-intl-email-ready #hl-email-action .hl-email-icon {
    width: 14px;
    height: 14px;
  }

  body.hl-intl-email-ready #hl-email-action .hl-email-label:not(.hl-email-short) { display: none; }
  body.hl-intl-email-ready #hl-email-action .hl-email-short { display: inline; }

  body.hl-ms-menu-open #hl-email-action,
  body.hl-ms-keyboard-open #hl-email-action { display: none; }

  /* Reserve the narrow lane while chat loads, growing only for a wider safe area. */
  body.hl-intl-email-ready #hl-ms-actions {
    right: var(--hl-intl-email-lane) !important;
  }

  body.hl-intl-email-ready #hl-cta-bar {
    width: calc(100vw - var(--hl-intl-email-lane)) !important;
  }

  /* The wider backup entry must clear the old dock as well as the email button. */
  body.hl-intl-email-ready:not(.hl-ms-ready):has(#hl-cta-bar) #hl-contact-actions #hl-online-chat {
    bottom: max(var(--hl-intl-chat-bottom), calc(86px + env(safe-area-inset-bottom, 0px))) !important;
  }
}
