/* GIWEXP website assistant. Brand variables come from the giwexp-onepage theme. */
.gwa-root {
  --gwa-primary: var(--primary-color, #3b5bdb);
  --gwa-primary-deep: var(--primary-deep, #2f46a8);
  --gwa-text: var(--text-color, #20292f);
  --gwa-muted: var(--light-text, #62717b);
  --gwa-wa: #128c7e;
  position: fixed;
  right: 16px;
  bottom: var(--gwa-bottom, 156px); /* set from JS to sit just above the reCAPTCHA badge, wherever it is */
  z-index: 99990;
  font-family: var(--body-font, 'Open Sans', Arial, sans-serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--gwa-text);
}

.gwa-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--gwa-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(32, 41, 47, .25);
  cursor: pointer;
}
.gwa-launcher:hover { background: var(--gwa-primary-deep); }
.gwa-launcher:focus-visible,
.gwa-root button:focus-visible,
.gwa-root a:focus-visible,
.gwa-root input:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.gwa-open .gwa-launcher span { display: none; }
/* The theme pins its floating buttons, side rail and modals at z-index 99997 to 999999.
   An open chat must sit above all of them or its header and close button get covered. */
.gwa-open { z-index: 1000001; }

.gwa-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - var(--gwa-bottom, 156px) - 90px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(32, 41, 47, .3);
  overflow: hidden;
}
.gwa-panel[hidden] { display: none; }

.gwa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gwa-primary);
  color: #fff;
}
.gwa-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px;
}
.gwa-close:hover { background: rgba(255, 255, 255, .28); }
.gwa-close-text { display: none; font-size: 15px; font-weight: 700; }
html.gwa-lock { overflow: hidden; }

.gwa-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f5f7fb;
}
.gwa-msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.gwa-assistant { align-self: flex-start; background: #fff; border: 1px solid #e3e8f0; }
.gwa-user { align-self: flex-end; background: var(--gwa-primary); color: #fff; }
.gwa-user a { color: #fff; }
.gwa-assistant a { color: var(--gwa-primary-deep); }
.gwa-typing { color: var(--gwa-muted); }

.gwa-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.gwa-contacts span { width: 100%; font-size: 13px; color: var(--gwa-muted); }
.gwa-contact {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--gwa-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.gwa-contact-whatsapp { border-color: var(--gwa-wa); color: var(--gwa-wa) !important; }

.gwa-chips {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
  overflow-x: auto;
  background: #fff;
}
.gwa-chip {
  flex: none;
  padding: 5px 10px;
  border: 1px solid #cdd5e3;
  border-radius: 999px;
  background: #fff;
  color: var(--gwa-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.gwa-chip:hover { border-color: var(--gwa-primary); color: var(--gwa-primary-deep); }

.gwa-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
}
.gwa-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #cdd5e3;
  border-radius: 8px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
}
.gwa-send {
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--gwa-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gwa-send:disabled { opacity: .6; cursor: progress; }

.gwa-notice {
  margin: 0;
  padding: 0 12px 10px;
  background: #fff;
  font-size: 11.5px;
  color: var(--gwa-muted);
}

@media (max-width: 600px) {
  .gwa-root { right: 12px; }
  /* Icon-only launcher on phones: the "Ask us" label took too much room. The button keeps its aria-label. */
  .gwa-launcher { width: 52px; height: 52px; padding: 0; justify-content: center; gap: 0; }
  .gwa-launcher span { display: none; }
  /* The full-screen sheet covers the page; Google's badge (z-index 2e9) would sit on top of its input. */
  html.gwa-lock .grecaptcha-badge { visibility: hidden; }
  /* Full-screen sheet. 100dvh tracks the visible area as the mobile browser's
     address bar shows and hides; plain 100vh does not and pushes the header
     (and the close button) off the top. */
  .gwa-open .gwa-launcher { display: none; }
  .gwa-panel {
    position: fixed;
    inset: 0;
    width: auto;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .gwa-head { padding: 8px 8px 8px 16px; }
  .gwa-close-text { display: inline; }
  .gwa-msg { max-width: 92%; }
}

@media print { .gwa-root { display: none; } }

.gwa-chip-person { border-color: var(--gwa-wa); color: var(--gwa-wa); font-weight: 600; }
button.gwa-contact { background: #fff; color: var(--gwa-primary-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.gwa-msgform { display: flex; flex-direction: column; gap: 6px; width: 88%; max-width: 88%; }
.gwa-msgform input[type=text], .gwa-msgform textarea { padding: 8px 10px; border: 1px solid #cdd5e3; border-radius: 8px; font: inherit; font-size: 16px; }
.gwa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gwa-formstatus { margin: 0; font-size: 13px; color: var(--gwa-muted); }

/* Teaser bubble above the launcher */
.gwa-teaser {
  position: absolute;
  right: 0;
  bottom: 64px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(290px, calc(100vw - 32px));
  padding: 12px 34px 12px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(32, 41, 47, .22);
  animation: gwa-pop .25s ease-out;
}
.gwa-teaser__avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.gwa-teaser__msg { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--gwa-text); text-align: left; cursor: pointer; }
.gwa-teaser__close { position: absolute; top: 6px; right: 8px; padding: 2px 6px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--gwa-muted); cursor: pointer; }
.gwa-open .gwa-teaser { display: none; }
@keyframes gwa-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gwa-teaser { animation: none; } }
