/* Go Wild Expedition WhatsApp Widget
   Self-contained floating utility. Matches existing theme green, gold and fonts. */
.gwewa-widget {
  --gwewa-green: #1a5632;
  --gwewa-green-dark: #0f3d22;
  --gwewa-gold: #d4a941;
  --gwewa-text: #243b2e;
  --gwewa-muted: #435b49;
  --gwewa-surface: #ffffff;
  --gwewa-field: #f8faf6;
  --gwewa-border: #687e6c;
  position: fixed;
  right: 22px;
  left: auto;
  bottom: calc(23px + env(safe-area-inset-bottom, 0px));
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease,
              bottom .22s ease;
  font-family: var(--esn-font-body, 'Raleway', sans-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gwewa-text);
  isolation: isolate;
}
/* Desktop launcher waits until the reader has reached the middle sections. */
.gwewa-widget.gwewa-eligible,
.gwewa-widget.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* Stack above the existing right-hand scroll-to-top button when it appears. */
body.gwe-has-scroll-top .gwewa-widget {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
body.gwe-has-scroll-top .gwewa-widget .gwewa-panel {
  max-height: min(650px, calc(100dvh - 186px));
}
.gwewa-widget,
.gwewa-widget *,
.gwewa-widget *::before,
.gwewa-widget *::after {
  box-sizing: border-box;
}
.gwewa-widget .gwewa-trigger {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 58px;
  min-width: 58px;
  width: max-content;
  padding: 5px 7px 5px 18px;
  margin: 0;
  border: 1px solid var(--gwewa-gold);
  border-radius: 999px;
  background: var(--gwewa-green);
  color: #ffffff;
  box-shadow: 0 7px 24px rgba(15, 61, 34, .22);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none !important;
  transition: background-color .18s ease, box-shadow .18s ease,
              padding .22s ease, gap .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.gwewa-widget .gwewa-trigger:hover,
.gwewa-widget .gwewa-trigger:focus-visible {
  background: var(--gwewa-green-dark);
  color: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 61, 34, .27);
  text-decoration: none;
}
.gwewa-widget .gwewa-trigger:focus-visible,
.gwewa-widget button:focus-visible,
.gwewa-widget input:focus-visible,
.gwewa-widget textarea:focus-visible,
.gwewa-widget .gwewa-fallback a:focus-visible {
  outline: 3px solid #bc8d20 !important;
  outline-offset: 3px !important;
}
.gwewa-widget .gwewa-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.gwewa-widget .gwewa-trigger-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  color: #ffffff;
  fill: none;
  stroke: currentColor;
}
.gwewa-widget .gwewa-trigger-label {
  display: block;
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transition: max-width .22s ease, opacity .18s ease;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #ffffff;
}
.gwewa-widget .gwewa-panel {
  position: absolute;
  right: 0;
  left: auto;
  bottom: calc(100% + 16px);
  width: min(384px, calc(100vw - 38px));
  max-height: min(650px, calc(100vh - 114px));
  max-height: min(650px, calc(100dvh - 114px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d9e4d8;
  border-radius: 19px;
  background: var(--gwewa-surface);
  box-shadow: 0 16px 52px rgba(18, 52, 31, .18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(.985);
  transform-origin: bottom right;
  transition: visibility .22s ease, opacity .22s ease, transform .22s ease;
}
.gwewa-widget .gwewa-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.gwewa-widget .gwewa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 17px 16px;
  min-height: 83px;
  background: var(--gwewa-green);
  color: #ffffff;
}
.gwewa-widget .gwewa-avatar {
  flex: 0 0 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 49px;
  height: 49px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  color: var(--gwewa-green-dark);
  font-size: 16px;
  font-weight: 800;
}
.gwewa-widget .gwewa-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}
.gwewa-widget .gwewa-header-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #ffffff;
}
.gwewa-widget .gwewa-header-copy strong {
  display: block;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
}
.gwewa-widget .gwewa-header-copy span {
  display: block;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: #f2f8f3;
}
.gwewa-widget .gwewa-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 0 0 2px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #ffffff;
  cursor: pointer;
  box-shadow: none;
}
.gwewa-widget .gwewa-close:hover { background: rgba(255,255,255,.2); }
.gwewa-widget .gwewa-close svg {
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.gwewa-widget .gwewa-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 23px 24px 22px;
  background: #ffffff;
}
.gwewa-widget .gwewa-heading {
  margin: 0 0 10px;
  padding: 0;
  color: var(--gwewa-green-dark);
  font-family: var(--esn-font-heading, 'Playfair Display', Georgia, serif);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.28;
}
.gwewa-widget .gwewa-description {
  margin: 0 0 20px;
  color: var(--gwewa-muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}
.gwewa-widget .gwewa-form { margin: 0; padding: 0; display: flex; flex-direction: column; }
.gwewa-widget .gwewa-form label {
  margin: 0 0 7px;
  padding: 0;
  display: block;
  color: var(--gwewa-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.5;
}
.gwewa-widget .gwewa-form label span { color: #974025; }
.gwewa-widget .gwewa-form input,
.gwewa-widget .gwewa-form textarea {
  display: block;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 51px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--gwewa-border);
  border-radius: 11px;
  background: var(--gwewa-field);
  box-shadow: none;
  color: var(--gwewa-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  transition: background-color .18s ease, border-color .18s ease,
              box-shadow .18s ease;
}
.gwewa-widget .gwewa-form textarea {
  resize: vertical;
  min-height: 110px;
  max-height: 230px;
}
.gwewa-widget .gwewa-form input::placeholder,
.gwewa-widget .gwewa-form textarea::placeholder {
  color: #455b4d;
  opacity: 1;
  font-size: 16px;
}
.gwewa-widget .gwewa-form input:hover,
.gwewa-widget .gwewa-form textarea:hover {
  border-color: #47785a;
  background: #ffffff;
}
.gwewa-widget .gwewa-form input:focus,
.gwewa-widget .gwewa-form textarea:focus {
  border-color: #1a5632;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26,86,50,.12);
}
.gwewa-widget .gwewa-submit {
  width: 100%;
  min-height: 54px;
  margin: 2px 0 0;
  padding: 13px 12px;
  border: 1px solid var(--gwewa-green-dark);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--gwewa-green);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: none;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.gwewa-widget .gwewa-submit:hover {
  background: var(--gwewa-green-dark);
  box-shadow: 0 5px 13px rgba(15,61,34,.15);
}
.gwewa-widget .gwewa-submit svg { flex: 0 0 21px; width: 21px; height: 21px; }
.gwewa-widget .gwewa-note,
.gwewa-widget .gwewa-fallback {
  margin: 13px 0 0;
  padding: 0;
  color: #435b49;
  text-align: center;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}
.gwewa-widget .gwewa-fallback a {
  color: var(--gwewa-green-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gwewa-widget .gwewa-fallback[hidden] { display: none !important; }
@media (max-width: 767px) {
  .gwewa-widget {
    right: 15px;
    left: auto;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  body.gwe-has-scroll-top .gwewa-widget {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.gwe-has-scroll-top .gwewa-widget .gwewa-panel {
    max-height: calc(100dvh - 174px);
  }
  .gwewa-widget .gwewa-trigger {
    min-height: 54px;
    min-width: 54px;
    padding: 4px 5px 4px 15px;
  }
  .gwewa-widget .gwewa-trigger-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .gwewa-widget .gwewa-panel {
    bottom: calc(100% + 13px);
    width: min(368px, calc(100vw - 30px));
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    border-radius: 17px;
  }
  .gwewa-widget .gwewa-body { padding: 19px 19px 21px; }
  .gwewa-widget .gwewa-heading { font-size: 24px; }
}
@media (max-width: 360px) {
  .gwewa-widget .gwewa-header { padding: 12px 11px; gap: 8px; }
  .gwewa-widget .gwewa-body { padding: 16px 14px 18px; }
  .gwewa-widget .gwewa-header-copy strong { font-size: 16px; }
  .gwewa-widget .gwewa-header-copy span { font-size: 16px; }
  .gwewa-widget .gwewa-close { width: 44px; flex-basis: 44px; }
}
/* Mobile chat: show the complete enquiry form in one centered panel.
 * Desktop styling and WhatsApp behaviour are intentionally untouched.
 * On exceptionally short visual viewports, the panel itself can still scroll
 * rather than clipping mandatory inputs or the submit action. */
@media (max-width: 767px) {
  /* A transformed floating launcher becomes the containing block for
     position:fixed children. Remove that transform on mobile. */
  .gwewa-widget,
  .gwewa-widget.gwewa-eligible,
  .gwewa-widget.is-open {
    transform: none;
  }
  .gwewa-widget .gwewa-panel,
  body.gwe-has-scroll-top .gwewa-widget .gwewa-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--gwewa-visible-top, 0px) + var(--gwewa-visible-half, 50dvh));
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: calc(var(--gwewa-visible-height, 100dvh) - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateY(calc(-50% + 12px)) scale(.985);
    transform-origin: center;
  }
  .gwewa-widget .gwewa-panel.is-open {
    transform: translateY(-50%) scale(1);
  }
  .gwewa-widget .gwewa-header {
    min-height: 0;
    padding: 12px 15px;
    gap: 10px;
  }
  .gwewa-widget .gwewa-avatar {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
  }
  .gwewa-widget .gwewa-header-copy strong {
    font-size: 17px;
    line-height: 1.25;
  }
  .gwewa-widget .gwewa-header-copy span {
    font-size: 16px;
    line-height: 1.3;
  }
  .gwewa-widget .gwewa-body {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    padding: 15px 18px 16px;
  }
  .gwewa-widget .gwewa-heading {
    font-size: 23px;
    line-height: 1.28;
    margin: 0 0 7px;
  }
  .gwewa-widget .gwewa-description {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 13px;
  }
  .gwewa-widget .gwewa-form label {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 5px;
  }
  .gwewa-widget .gwewa-form input {
    min-height: 46px;
    height: 46px;
    padding: 9px 12px;
    margin: 0 0 12px;
    font-size: 16px;
  }
  .gwewa-widget .gwewa-form textarea {
    min-height: 82px;
    height: 82px;
    max-height: 180px;
    padding: 10px 12px;
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.5;
  }
  .gwewa-widget .gwewa-submit {
    min-height: 50px;
    padding: 11px 9px;
    font-size: 16px;
  }
  .gwewa-widget .gwewa-note,
  .gwewa-widget .gwewa-fallback {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 9px;
  }
}
/* On short phones, keep the form and Send button ahead of nonessential copy. */
@media (max-width: 767px) and (max-height: 700px) {
  .gwewa-widget .gwewa-header { padding: 9px 13px; }
  .gwewa-widget .gwewa-body { padding: 12px 16px 14px; }
  .gwewa-widget .gwewa-description,
  .gwewa-widget .gwewa-note { display: none; }
}
/* The mobile keyboard may shrink the visual viewport without triggering
   the CSS height media query, so mirror the compact rules using a JS class. */
@media (max-width: 767px) {
  .gwewa-widget.gwewa-short-viewport .gwewa-header { padding: 9px 13px; }
  .gwewa-widget.gwewa-short-viewport .gwewa-body { padding: 12px 16px 14px; }
  .gwewa-widget.gwewa-short-viewport .gwewa-description,
  .gwewa-widget.gwewa-short-viewport .gwewa-note { display: none; }
  .gwewa-widget.gwewa-tiny-viewport .gwewa-header-copy span { display: none; }
  .gwewa-widget.gwewa-tiny-viewport .gwewa-heading { font-size: 21px; }
  .gwewa-widget.gwewa-tiny-viewport .gwewa-form textarea {
    min-height: 65px;
    height: 65px;
  }
}
/* Tiny landscape viewports and open keyboards: avoid clipped controls. */
@media (max-width: 767px) and (max-height: 480px) {
  .gwewa-widget .gwewa-header-copy span { display: none; }
  .gwewa-widget .gwewa-heading { font-size: 21px; }
  .gwewa-widget .gwewa-form textarea {
    min-height: 65px;
    height: 65px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gwewa-widget .gwewa-panel,
  .gwewa-widget .gwewa-trigger,
  .gwewa-widget .gwewa-trigger-label,
  .gwewa-widget .gwewa-form input,
  .gwewa-widget .gwewa-form textarea,
  .gwewa-widget .gwewa-submit { transition: none !important; }
}
