/* Estero Bay AI website assistant widget */
.eba-chat-launcher {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 20px 0 16px;
  border: 1px solid rgba(233, 201, 139, 0.7);
  border-radius: 999px;
  color: var(--white, #fff);
  background: var(--navy-900, #0b2137);
  box-shadow: 0 16px 40px rgba(4, 20, 33, 0.28);
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}
.eba-chat-launcher:hover { background: var(--navy-800, #153a57); transform: translateY(-1px); }
.eba-chat-launcher:focus-visible,
.eba-chat button:focus-visible,
.eba-chat textarea:focus-visible {
  outline: 3px solid var(--teal-500, #12bdc2);
  outline-offset: 2px;
}
.eba-chat-launcher svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-300, #e9c98b); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eba-chat-launcher[aria-expanded="true"] { display: none; }

.eba-chat {
  position: fixed;
  z-index: 61;
  right: 20px;
  bottom: 20px;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 40px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(22, 48, 71, 0.16);
  border-radius: 20px;
  color: var(--ink, #163047);
  background: var(--sand-50, #fbf8f0);
  box-shadow: 0 24px 70px rgba(4, 26, 42, 0.3);
  font-family: var(--sans, system-ui, sans-serif);
}
.eba-chat[hidden] { display: none; }

.eba-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px 18px;
  color: var(--white, #fff);
  background: var(--navy-900, #0b2137);
  border-bottom: 3px solid var(--gold-400, #dcaf63);
}
.eba-chat-title { margin: 0; font-size: 16px; font-weight: 750; line-height: 1.3; color: var(--gold-300, #e9c98b); }
.eba-chat-note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.86); }
.eba-chat-note a { color: var(--teal-200, #a3e7e3); text-decoration: underline; }
.eba-chat-close {
  flex: none;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white, #fff);
  background: transparent;
  font-size: 20px;
  line-height: 1;
}
.eba-chat-close:hover { background: rgba(255, 255, 255, 0.1); }

.eba-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.eba-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.eba-msg-bot { align-self: flex-start; background: var(--white, #fff); border: 1px solid rgba(22, 48, 71, 0.12); border-bottom-left-radius: 4px; }
.eba-msg-user { align-self: flex-end; color: var(--white, #fff); background: var(--teal-700, #008e97); border-bottom-right-radius: 4px; }
.eba-msg-error { align-self: flex-start; background: #fff4e0; border: 1px solid var(--gold-400, #dcaf63); }
.eba-msg a { color: var(--teal-700, #008e97); text-decoration: underline; }
.eba-msg-user a { color: var(--white, #fff); }
.eba-typing { align-self: flex-start; color: var(--muted, #617386); font-size: 13px; font-style: italic; }

.eba-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.eba-suggest button {
  padding: 8px 12px;
  border: 1px solid var(--teal-600, #00a9af);
  border-radius: 999px;
  color: var(--navy-850, #102a43);
  background: var(--white, #fff);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}
.eba-suggest button:hover { background: #e9f8f7; }

.eba-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(22, 48, 71, 0.12);
  background: var(--white, #fff);
}
.eba-chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 110px;
  padding: 10px 12px;
  resize: none;
  border: 1px solid rgba(22, 48, 71, 0.25);
  border-radius: 12px;
  color: var(--ink, #163047);
  background: var(--white, #fff);
  font-size: 16px; /* prevents iOS zoom */
  line-height: 1.4;
}
.eba-chat-form button {
  flex: none;
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: var(--navy-950, #07182a);
  background: var(--gold-400, #dcaf63);
  font-weight: 750;
}
.eba-chat-form button:disabled { opacity: 0.55; cursor: default; }
.eba-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .eba-chat-launcher { right: 14px; bottom: 14px; }
  .eba-chat { right: 0; bottom: 0; width: 100vw; height: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eba-chat-launcher { transition: none; }
}
