/* Gota assistant: all selectors are scoped to this widget. */
.gota-chat-widget {
  --gota-ink: #18202a;
  --gota-muted: #6d7682;
  --gota-blue: #067fa5;
  --gota-blue-deep: #056885;
  --gota-paper: #fff;
  --gota-soft: #f4f7fb;
  --gota-line: #e4eaf1;
  position: fixed;
  right: max(22px, env(safe-area-inset-right, 0px) + 14px);
  bottom: max(22px, env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 1200;
  color: var(--gota-ink);
  font-family: var(--font-body), sans-serif;
  line-height: 1.45;
  isolation: isolate;
}

.gota-chat-widget--home-hero { right: max(28px, env(safe-area-inset-right, 0px) + 20px); bottom: max(18px, env(safe-area-inset-bottom, 0px) + 12px); }
.gota-chat-widget--home-hero .gota-chat-launcher { width: 196px; height: 196px; }
.gota-chat-widget--home-hero .gota-chat-avatar { width: 188px; height: 188px; }
.gota-chat-widget--home-hero .gota-chat-panel { bottom: 210px; z-index: 2; }

.gota-chat-widget *,
.gota-chat-widget *::before,
.gota-chat-widget *::after { box-sizing: border-box; }

.gota-chat-widget--nav-open { visibility: hidden; pointer-events: none; }

.gota-chat-widget [hidden] { display: none !important; }

.gota-chat-widget button,
.gota-chat-widget textarea { font: inherit; }

.gota-chat-widget button { -webkit-tap-highlight-color: transparent; }

.gota-chat-dock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}

/* Reuse the Back to Top visibility state so the launcher and its tooltip clear the button. */
.back-to-top-visible .gota-chat-widget .gota-chat-dock { transform: translateY(-84px); }

.gota-chat-launcher {
  position: relative;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 9px 16px rgb(15 43 79 / 20%));
  transition: transform 220ms ease, filter 220ms ease;
  animation: gota-chat-float 4s ease-in-out infinite;
}

.gota-chat-launcher:hover {
  transform: translateY(-4px) scale(1.035);
  filter: drop-shadow(0 13px 19px rgb(15 43 79 / 25%));
}

.gota-chat-launcher:active { transform: translateY(-1px) scale(.98); }

.gota-chat-launcher:focus-visible,
.gota-chat-widget button:focus-visible,
.gota-chat-widget textarea:focus-visible {
  outline: 3px solid #80b8ff;
  outline-offset: 4px;
}

.gota-chat-avatar {
  position: relative;
  display: block;
  width: 94px;
  height: 94px;
  overflow: visible;
  flex: 0 0 auto;
}

.gota-chat-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.gota-chat-launcher-label {
  position: absolute;
  right: 0;
  bottom: calc(100% - 2px);
  max-width: min(240px, calc(100vw - 36px));
  padding: 9px 13px;
  border: 1px solid rgb(224 232 241 / 92%);
  border-radius: 14px 14px 5px 14px;
  background: #fff;
  color: #263747;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  box-shadow: 0 5px 14px rgb(20 35 52 / 9%);
  animation: gota-chat-prompt-in 420ms 180ms cubic-bezier(.2,.8,.2,1) both;
  pointer-events: none;
}

.gota-chat-panel {
  position: absolute;
  right: 0;
  bottom: 132px;
  display: flex;
  width: min(390px, calc(100vw - 32px));
  height: min(70vh, 620px, calc(100dvh - 260px));
  min-height: min(410px, calc(100dvh - 260px));
  max-height: 70vh;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 24px;
  background: rgb(255 255 255 / 72%);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  backdrop-filter: blur(20px) saturate(118%);
  box-shadow: 0 24px 70px rgb(20 35 52 / 20%), 0 5px 18px rgb(20 35 52 / 8%), inset 0 1px 0 rgb(255 255 255 / 62%);
  transform-origin: bottom right;
  animation: gota-chat-panel-in 220ms cubic-bezier(.2,.8,.2,1) both;
}

.gota-chat-panel[hidden] { display: none !important; }

.gota-chat-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 9px 17px;
  border-bottom: 1px solid rgb(255 255 255 / 54%);
  background: linear-gradient(135deg, rgb(255 255 255 / 48%), rgb(248 252 255 / 34%) 74%);
}

.gota-chat-header-copy { display: flex; min-width: 0; flex: 1; align-items: center; gap: 9px; }
.gota-chat-name { display: block; margin: 0; color: var(--gota-ink); font: 600 16px/1.2 var(--font-heading), sans-serif; letter-spacing:0; }
.gota-chat-status-dot { display: block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #36b981; box-shadow: 0 0 0 3px rgb(54 185 129 / 13%); }

.gota-chat-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #5c6672;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.gota-chat-close:hover { background: #edf3fa; color: var(--gota-ink); }
.gota-chat-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.gota-chat-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 18px 16px 14px;
  overscroll-behavior: contain;
  scrollbar-color: #c6d3e2 transparent;
  scrollbar-width: thin;
  background: linear-gradient(180deg, rgb(248 252 255 / 15%), rgb(255 255 255 / 9%) 100%);
}

.gota-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(210 222 234 / 70%);
  background: rgb(255 255 255 / 84%);
}
.gota-chat-composer[hidden] { display: none; }
.gota-chat-composer-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.gota-chat-composer-input {
  width: 0;
  min-width: 0;
  min-height: 42px;
  flex: 1 1 auto;
  padding: 9px 12px;
  border: 1px solid #c8d7e4;
  border-radius: 12px;
  background: #fff;
  color: #26313e;
  font: inherit;
  font-size: 13px;
}
.gota-chat-composer-input:focus-visible { outline: 3px solid rgb(20 133 163 / 35%); border-color: #1485a3; }
.gota-chat-composer-send {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #087a9a;
  border-radius: 12px;
  background: #087a9a;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.gota-chat-composer-send:hover { background: #056885; }
.gota-chat-composer-send:focus-visible { outline: 3px solid #80b8ff; outline-offset: 2px; }

.gota-chat-message {
  width: fit-content;
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid rgb(255 255 255 / 74%);
  border-radius: 15px 15px 15px 5px;
  background: rgb(255 255 255 / 78%);
  color: #26313e;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: 0 3px 10px rgb(24 48 70 / 5%);
}

.gota-chat-end-note {
  margin: 0 2px 2px;
  color: #657381;
  font-size: 11px;
  line-height: 1.55;
}

.gota-chat-typing {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 74%);
  border-radius: 15px 15px 15px 5px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 3px 10px rgb(24 48 70 / 5%);
}
.gota-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: #7f8a96; animation: gota-chat-typing 900ms ease-in-out infinite; }
.gota-chat-typing span:nth-child(2) { animation-delay: 140ms; }
.gota-chat-typing span:nth-child(3) { animation-delay: 280ms; }

.gota-chat-message--visitor {
  align-self: flex-end;
  border-color: rgb(94 220 239 / 68%);
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(145deg, rgb(0 167 198 / 91%), rgb(5 111 151 / 93%));
  color: #fff;
  box-shadow: 0 5px 14px rgb(0 116 148 / 17%);
}

.gota-chat-message-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: -5px;
  padding: 0 1px;
  color: #176acb;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.gota-chat-message-link:hover { color: #0e4f9b; text-decoration: underline; }
.gota-chat-message-link:focus-visible { outline: 2px solid #80b8ff; outline-offset: 3px; border-radius: 3px; }

.gota-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1px;
}

.gota-chat-decision-group {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
  animation: gota-chat-options-in 180ms ease-out both;
}

.gota-chat-decision-group--feedback { width: min(100%, 250px); flex-direction: row; flex-wrap: nowrap; gap: 7px; }
.gota-chat-decision-group--feedback .gota-chat-decision { min-width: 0; flex: 1 1 0; padding: 9px 8px; text-align: center; white-space: nowrap; }

.gota-chat-suggestion {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgb(195 216 229 / 80%);
  border-radius: 12px;
  background: rgb(255 255 255 / 76%);
  color: #185d7a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.gota-chat-suggestion:hover { transform: translateY(-1px); border-color: rgb(69 170 197 / 75%); background: rgb(255 255 255 / 92%); box-shadow: 0 4px 12px rgb(24 91 116 / 8%); }
.gota-chat-suggestion:focus-visible { outline: 3px solid #1485a3; outline-offset: 2px; }

.gota-chat-decision {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgb(195 216 229 / 80%);
  border-radius: 12px;
  background: rgb(255 255 255 / 84%);
  color: #185d7a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.gota-chat-decision:hover { transform: translateY(-1px); border-color: rgb(69 170 197 / 75%); background: rgb(255 255 255 / 96%); box-shadow: 0 4px 12px rgb(24 91 116 / 8%); }
.gota-chat-decision:focus-visible { outline: 3px solid #1485a3; outline-offset: 2px; }

@keyframes gota-chat-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes gota-chat-panel-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes gota-chat-prompt-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes gota-chat-typing { 0%, 60%, 100% { opacity: .45; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes gota-chat-options-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

@supports not (backdrop-filter: blur(20px)) and not (-webkit-backdrop-filter: blur(20px)) {
  .gota-chat-panel { background: rgb(255 255 255 / 96%); }
  .gota-chat-header { background: linear-gradient(135deg, rgb(255 255 255 / 96%), rgb(248 252 255 / 94%) 74%); }
  .gota-chat-messages { background: linear-gradient(180deg, rgb(255 255 255 / 28%), rgb(248 250 253 / 24%) 100%); }
  .gota-chat-message,
  .gota-chat-suggestion,
  .gota-chat-decision { background: rgb(255 255 255 / 92%); }
}

@media (max-width: 600px) {
  .gota-chat-widget { right: max(12px, env(safe-area-inset-right, 0px) + 8px); bottom: max(12px, env(safe-area-inset-bottom, 0px) + 8px); }
  .gota-chat-launcher { width: 82px; height: 82px; }
  .gota-chat-avatar { width: 78px; height: 78px; }
  .gota-chat-widget--home-hero { right: max(12px, env(safe-area-inset-right, 0px) + 8px); bottom: max(10px, env(safe-area-inset-bottom, 0px) + 8px); }
  .gota-chat-widget--home-hero .gota-chat-launcher { width: 156px; height: 156px; }
  .gota-chat-widget--home-hero .gota-chat-avatar { width: 150px; height: 150px; }
  .gota-chat-widget--home-hero .gota-chat-launcher-label { max-width: min(240px, calc(100vw - 24px)); }
  .gota-chat-panel {
    position: fixed;
    inset: max(8px, env(safe-area-inset-top, 0px) + 8px) 8px max(8px, env(safe-area-inset-bottom, 0px) + 8px);
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 21px;
    transform-origin: bottom right;
  }
  .gota-chat-header { min-height: 60px; padding: 8px 14px; }
  .gota-chat-messages { padding: 16px 13px 12px; }
  .gota-chat-message { max-width: 92%; font-size: 13px; }
}

@media (max-width: 360px) {
  .gota-chat-decision-group--feedback .gota-chat-decision { padding: 8px 6px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .gota-chat-dock { transition: none; }
  .gota-chat-widget *,
  .gota-chat-widget *::before,
  .gota-chat-widget *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .gota-chat-launcher-label { animation: none; }
}

