.de-whatsapp,
.de-whatsapp * {
  box-sizing: border-box;
}

.de-whatsapp {
  position: fixed;
  z-index: 1380;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: scale(1.2);
  transform-origin: bottom right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}

.de-whatsapp [hidden] {
  display: none !important;
}

.de-whatsapp-dialog-open {
  overflow: hidden;
}

html.de-whatsapp-dialog-open body {
  overflow: hidden !important;
}

.de-whatsapp-dialog,
.de-whatsapp-dialog * {
  box-sizing: border-box;
}

.de-whatsapp-dialog:not([open]) {
  display: none;
}

.de-whatsapp-dialog {
  position: fixed;
  inset: 0;
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce7e2;
  border-radius: 22px !important;
  background: #fff;
  color: #172c2a;
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  box-shadow: 0 20px 70px rgba(0, 30, 20, 0.25);
}

.de-whatsapp-dialog::backdrop {
  background: rgba(5, 18, 24, 0.62);
  backdrop-filter: blur(3px);
}

.de-whatsapp-dialog-brand {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: 50% !important;
  background: #087f5b;
  color: #fff;
}

.de-whatsapp-dialog-brand svg {
  width: 30px;
  height: 30px;
}

.de-whatsapp-launcher > svg path,
.de-whatsapp-inline > svg path,
.de-whatsapp-dialog-brand svg path,
.de-whatsapp-confirm svg path {
  fill: currentColor;
  stroke: none;
}

.de-whatsapp-dialog h2 {
  margin: 0 0 12px;
  color: #172c2a;
  font-size: 25px !important;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: none;
}

.de-whatsapp-dialog p {
  margin: 0 0 24px;
  color: #52635f;
  font-size: 16px !important;
  line-height: 1.55;
}

.de-whatsapp-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50% !important;
  background: #f0f6f3;
  color: #52635f;
  cursor: pointer;
}

.de-whatsapp-dialog-close svg {
  width: 20px;
  height: 20px;
}

.de-whatsapp-dialog-close svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.de-whatsapp-confirm,
.de-whatsapp-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px !important;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  cursor: pointer;
}

.de-whatsapp-dialog .de-whatsapp-confirm,
.de-whatsapp-dialog .de-whatsapp-confirm span,
.de-whatsapp-dialog .de-whatsapp-cancel {
  font-size: 16px !important;
}

.de-whatsapp-confirm {
  background: #087f5b;
  color: #fff !important;
}

.de-whatsapp-confirm:hover {
  background: #066649;
}

.de-whatsapp-confirm svg {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
}

.de-whatsapp-cancel {
  margin-top: 8px;
  background: #fff;
  color: #52635f;
}

.de-whatsapp-cancel:hover {
  background: #f0f6f3;
}

.de-whatsapp-dialog a:focus-visible,
.de-whatsapp-dialog button:focus-visible {
  outline: 3px solid #6DCB04;
  outline-offset: 3px;
}

/* Keep contact controls clear of the existing consent and navigation layers. */
body:has(#mobile-menu-btn[aria-expanded="true"]) .de-whatsapp,
html.de-consent-dialog-open .de-whatsapp,
body:has([data-consent-banner]:not([hidden])) .de-whatsapp {
  visibility: hidden;
  pointer-events: none;
}

.de-whatsapp-launcher {
  --whatsapp-launcher-width: 56px;
  --whatsapp-label-width: 0px;
  --whatsapp-label-gap: 0px;
  --whatsapp-label-opacity: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: var(--whatsapp-launcher-width);
  height: 56px;
  min-height: 56px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px !important;
  background: #087f5b;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  box-shadow: 0 5px 22px rgba(0, 36, 26, 0.24);
  transition: width 240ms ease, background 160ms ease, box-shadow 160ms ease;
}

.de-whatsapp-prompt-open .de-whatsapp-launcher {
  background: #066649;
  box-shadow: 0 7px 26px rgba(0, 36, 26, 0.3);
}

.de-whatsapp svg,
.de-whatsapp-inline svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.de-whatsapp .de-whatsapp-launcher,
.de-whatsapp .de-whatsapp-launcher-label {
  font-size: 15px !important;
}

.de-whatsapp-launcher > svg {
  width: 28px;
  height: 28px;
  margin-left: 13px;
}

.de-whatsapp-launcher-label {
  display: block;
  max-width: var(--whatsapp-label-width);
  margin-left: var(--whatsapp-label-gap);
  overflow: hidden;
  opacity: var(--whatsapp-label-opacity);
  white-space: nowrap;
  transition: max-width 240ms ease, margin-left 240ms ease, opacity 160ms ease;
}

.de-whatsapp .de-whatsapp-notification {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 50% !important;
  background: #d9233f;
  color: #fff;
  font-size: 12px !important;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(55, 8, 15, 0.2);
  pointer-events: none;
}

@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .de-whatsapp-prompt-open .de-whatsapp-launcher {
    --whatsapp-launcher-width: 156px;
    --whatsapp-label-width: 90px;
    --whatsapp-label-gap: 10px;
    --whatsapp-label-opacity: 1;
  }
}

@media (min-width: 721px) {
  .de-whatsapp-prompt-open .de-whatsapp-launcher {
    --whatsapp-launcher-width: 156px;
    --whatsapp-label-width: 90px;
    --whatsapp-label-gap: 10px;
    --whatsapp-label-opacity: 1;
  }
}

.de-whatsapp-prompt {
  position: relative;
  order: -1;
  width: 276px;
  max-width: calc(100vw - 32px);
  padding: 20px 20px 14px;
  border: 1px solid #dce7e2;
  border-radius: 16px !important;
  background: #fff;
  color: #172c2a;
  box-shadow: 0 8px 32px rgba(6, 25, 23, 0.14);
}

.de-whatsapp-prompt::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 28px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-right: 1px solid #dce7e2;
  border-bottom: 1px solid #dce7e2;
  background: #fff;
}

.de-whatsapp-prompt p {
  margin: 0;
}

.de-whatsapp .de-whatsapp-heading {
  padding-right: 24px;
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.35;
}

.de-whatsapp .de-whatsapp-description {
  margin-top: 6px;
  color: #52635f;
  font-size: 14px !important;
  line-height: 1.5;
}

.de-whatsapp-dismiss {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50% !important;
  background: transparent;
  color: #62736e;
  cursor: pointer;
}

.de-whatsapp-dismiss svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.de-whatsapp-dismiss:hover {
  color: #12372a;
  background: #f0f6f3;
}

.de-whatsapp-prompt-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  color: #08734f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.de-whatsapp-prompt-link svg {
  display: none;
}

.de-whatsapp .de-whatsapp-prompt-link,
.de-whatsapp .de-whatsapp-prompt-link span {
  font-size: 14px !important;
}

.de-whatsapp a:focus-visible,
.de-whatsapp button:focus-visible,
.de-whatsapp-inline:focus-visible {
  outline: 3px solid #6DCB04;
  outline-offset: 4px;
}

.de-whatsapp-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #71e8ae !important;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.de-whatsapp-inline:hover {
  color: #b5f5d2 !important;
}

.de-whatsapp-inline svg {
  width: 20px;
  height: 20px;
}

.de-whatsapp-quote {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(16, 29, 46, 0.2);
}

.de-whatsapp-quote .de-whatsapp-inline {
  color: #101d2e !important;
}

.de-whatsapp-quote .de-whatsapp-inline:hover {
  color: #064c40 !important;
}

.de-whatsapp-quote p {
  margin: 0 0 3px;
}

.de-whatsapp-quote .de-whatsapp-inline,
.de-whatsapp-quote .de-whatsapp-inline span {
  font-size: 16px !important;
}

@media (max-width: 720px) {
  .de-whatsapp-dialog {
    width: calc(100% - 24px);
    margin: auto auto max(12px, env(safe-area-inset-bottom));
    padding: 24px;
  }

  .de-whatsapp {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(var(--de-whatsapp-bottom-obstruction, 0px) + 12px + env(safe-area-inset-bottom));
  }

  .de-whatsapp-launcher {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
  }

  .de-whatsapp-launcher-label {
    display: none;
  }

  .de-whatsapp-launcher svg {
    width: 28px;
    height: 28px;
    margin-left: 11px;
  }

  .de-whatsapp-prompt {
    display: none;
  }

  .de-whatsapp-at-form,
  .de-whatsapp-input-active {
    visibility: hidden;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .de-whatsapp-launcher,
  .de-whatsapp-launcher-label {
    transition: none;
  }
}

@media print {
  .de-whatsapp {
    display: none;
  }
}

/* Retain the reference dimensions while matching Door Engineers typography. */
.de-whatsapp-launcher { cursor: pointer; font-family: inherit; }
.de-whatsapp-heading { text-transform: none; letter-spacing: normal; }
.de-whatsapp-quote .de-whatsapp-inline { color: #121315 !important; }
.de-whatsapp-quote--dark .de-whatsapp-inline { color: #71e8ae !important; }
.de-whatsapp-quote--dark .de-whatsapp-inline:hover { color: #b5f5d2 !important; }
.de-whatsapp-quote--dark { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .2); }
.de-whatsapp-footer { font-size: 14px; }
.de-whatsapp-dialog h2:focus { outline: none; }
.de-whatsapp [aria-disabled="true"], .de-whatsapp-dialog [aria-disabled="true"],
.de-whatsapp-inline[aria-disabled="true"] { cursor: default; }
@media (hover: none), (pointer: coarse) {
  .de-whatsapp-launcher { width: 52px; height: 52px; min-height: 52px; }
  .de-whatsapp-launcher-label { display: none; }
  .de-whatsapp-launcher > svg { margin-left: 11px; }
  .de-whatsapp-prompt { display: none; }
  .de-whatsapp-at-form, .de-whatsapp-input-active { visibility: hidden; pointer-events: none; }
}

[data-whatsapp-contact]:empty { display: none; }
