/* Travelo DMC — trade desk WhatsApp UI (TDMC-WA1 r4) */
:root {
  --tdmc-wa-green: #25D366;
  --tdmc-wa-navy: #0A2E50;
  --tdmc-wa-coral: #C2410C;
  --tdmc-wa-bottom: 20px;
}

.tdmc-wa-fab-wrap {
  position: fixed;
  right: 20px;
  bottom: calc(var(--tdmc-wa-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, bottom 160ms ease;
}

.tdmc-wa-fab-wrap.tdmc-wa-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  /* Visibility completes after the fade. JS removes the link from the tab order
     and accessibility tree immediately while this visual transition finishes. */
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, bottom 160ms ease, visibility 0s linear 160ms;
}

/* r3 retains the r2 tap fix: the child link sets pointer-events:auto, which overrode the wrapper's
   pointer-events:none and left an invisible 56px tap target over submit buttons. */
.tdmc-wa-fab-wrap.tdmc-wa-hidden .tdmc-wa-fab {
  pointer-events: none;
}

.tdmc-wa-fab {
  position: relative;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--tdmc-wa-green);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(10, 46, 80, 0.24);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tdmc-wa-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 46, 80, 0.30);
}

.tdmc-wa-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(10, 46, 80, 0.9), 0 12px 30px rgba(10, 46, 80, 0.30);
}

.tdmc-wa-fab svg {
  width: 34px;
  height: 34px;
  display: block;
  fill: currentColor;
  transform: translateY(-0.25px);
}

.tdmc-wa-fab-label {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translate(6px, -50%);
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--tdmc-wa-navy);
  color: #fff;
  font-family: Karla, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease, transform 140ms ease;
}

@media (min-width: 768px) {
  .tdmc-wa-fab:hover .tdmc-wa-fab-label,
  .tdmc-wa-fab:focus-visible .tdmc-wa-fab-label {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
  }
}

/* Agent registration: full-width grid item directly above the existing form row. */
.tdmc-wa-inline-cta {
  grid-column: 1 / -1;
  order: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--tdmc-wa-navy);
  color: #fff;
  font-family: Karla, Arial, sans-serif;
  box-shadow: 0 10px 26px rgba(10, 46, 80, 0.13);
}

.tdmc-wa-inline-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tdmc-wa-inline-cta__text {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
}

.tdmc-wa-inline-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  box-sizing: border-box;
  padding: 12px 18px;
  border: 2px solid var(--tdmc-wa-coral);
  border-radius: 18px;
  background: var(--tdmc-wa-coral);
  color: #fff;
  font-family: Karla, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tdmc-wa-inline-button:hover {
  background: #9F350A;
  border-color: #9F350A;
  color: #fff;
  transform: translateY(-1px);
}

.tdmc-wa-inline-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(194, 65, 12, 0.32);
}

@media (max-width: 767px) {
  .tdmc-wa-fab-wrap {
    right: 14px;
    --tdmc-wa-bottom: 16px;
  }

  .tdmc-wa-fab-label {
    display: none;
  }

  .tdmc-wa-inline-cta {
    padding: 18px;
  }

  .tdmc-wa-inline-cta__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tdmc-wa-inline-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tdmc-wa-fab-wrap,
  .tdmc-wa-fab-wrap.tdmc-wa-hidden,
  .tdmc-wa-fab,
  .tdmc-wa-fab-label,
  .tdmc-wa-inline-button {
    transition: none;
  }
}
