.csaia-widget,
.csaia-widget * {
  box-sizing: border-box;
}

.csaia-widget {
  --csaia-ink: #16353c;
  --csaia-teal: #0f615e;
  --csaia-deep: #0b393d;
  --csaia-coral: #f27660;
  --csaia-paper: #ffffff;
  --csaia-muted: #687b7d;
  --csaia-border: #e3ebea;
  color: var(--csaia-ink);
  font-family: inherit;
  line-height: 1.45;
  position: relative;
  z-index: 999990;
}

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

.csaia-launch {
  align-items: center;
  background: var(--csaia-deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 32px rgba(5, 37, 39, .25);
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 8px 19px 8px 9px;
  position: fixed;
  right: 24px;
  bottom: 24px;
  transition: transform .18s ease, box-shadow .18s ease;
  z-index: 999991;
}

.csaia-launch:hover,
.csaia-launch:focus-visible {
  box-shadow: 0 12px 35px rgba(5, 37, 39, .33);
  transform: translateY(-2px);
}

.csaia-launch:focus-visible,
.csaia-widget button:focus-visible,
.csaia-widget textarea:focus-visible {
  outline: 3px solid rgba(242, 118, 96, .8);
  outline-offset: 3px;
}

.csaia-launch-icon,
.csaia-brand-mark {
  align-items: center;
  background: var(--csaia-coral);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  letter-spacing: -.04em;
  width: 40px;
}

.csaia-launch-label {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
}

.csaia-panel {
  background: var(--csaia-paper);
  border: 1px solid rgba(12, 57, 61, .1);
  border-radius: 20px;
  bottom: 94px;
  box-shadow: 0 20px 70px rgba(8, 35, 39, .22);
  display: flex;
  flex-direction: column;
  height: min(690px, calc(100vh - 130px));
  max-height: 690px;
  overflow: hidden;
  position: fixed;
  right: 24px;
  width: min(390px, calc(100vw - 32px));
  z-index: 999992;
}

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

.csaia-header {
  align-items: center;
  background: linear-gradient(135deg, #0b393d 0%, #145d5c 100%);
  color: #fff;
  display: flex;
  gap: 11px;
  min-height: 76px;
  padding: 14px 15px;
}

.csaia-brand-mark {
  background: rgba(242, 118, 96, .98);
  border: 2px solid rgba(255, 255, 255, .75);
  flex: 0 0 42px;
  height: 42px;
  width: 42px;
}

.csaia-header-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.csaia-header-copy strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csaia-header-copy span {
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  letter-spacing: .04em;
  margin-top: 3px;
}

.csaia-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  display: inline-flex;
  font-size: 28px !important;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
  width: 36px;
}

.csaia-close:hover {
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.csaia-messages {
  background: #f6f9f8;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  min-height: 145px;
  overflow-y: auto;
  padding: 18px 15px;
  scroll-behavior: smooth;
}

.csaia-message {
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 88%;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.csaia-message a {
  color: #075f5d;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.csaia-message-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--csaia-border);
  border-bottom-left-radius: 5px;
  color: #29464a;
  box-shadow: 0 2px 8px rgba(13, 55, 59, .035);
}

.csaia-message-user {
  align-self: flex-end;
  background: #dcefeb;
  border: 1px solid #c9e3de;
  border-bottom-right-radius: 5px;
  color: #163d3f;
}

.csaia-thinking {
  color: #647a7b !important;
  font-style: italic;
}

.csaia-privacy {
  color: #667a7c;
  font-size: 10px;
  line-height: 1.45;
  margin: 0;
  padding: 9px 14px 2px;
}

.csaia-form {
  background: #fff;
  border-top: 1px solid #edf1f0;
  padding: 8px 12px 7px;
}

.csaia-input-row {
  align-items: flex-end;
  background: #f7f9f8;
  border: 1px solid #dce7e5;
  border-radius: 14px;
  display: flex;
  gap: 6px;
  padding: 5px 5px 5px 10px;
}

.csaia-input-row:focus-within {
  border-color: #8dbab2;
  box-shadow: 0 0 0 2px rgba(15, 97, 94, .08);
}

.csaia-widget .csaia-input-row textarea {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #1d393d;
  font-size: 13px;
  line-height: 1.4;
  max-height: 112px;
  min-height: 44px;
  outline: none;
  padding: 10px 2px;
  resize: vertical;
  width: 100%;
}

.csaia-widget .csaia-input-row textarea::placeholder {
  color: #8b9b9b;
  opacity: 1;
}

.csaia-send {
  align-items: center;
  background: var(--csaia-teal);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 17px !important;
  height: 38px;
  justify-content: center;
  margin-bottom: 2px;
  transition: background .15s ease, transform .15s ease;
  width: 38px;
}

.csaia-send:hover:not(:disabled) {
  background: #0b4d4b;
  transform: translateY(-1px);
}

.csaia-send:disabled {
  cursor: wait;
  opacity: .62;
}

.csaia-form-foot {
  color: #93a1a1;
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  padding: 6px 2px 0;
}

.csaia-handoff {
  background: #fff;
  padding: 0 12px 12px;
}

.csaia-whatsapp {
  align-items: center;
  background: #fff;
  border: 1px solid #b9ddd0;
  border-radius: 11px;
  color: #176553;
  cursor: pointer;
  display: flex;
  font-size: 12px !important;
  font-weight: 650;
  gap: 7px;
  justify-content: center;
  min-height: 39px;
  padding: 8px 12px;
  transition: background .15s ease, border-color .15s ease;
  width: 100%;
}

.csaia-whatsapp:hover {
  background: #f1faf6;
  border-color: #8fc6af;
}

.csaia-whatsapp[hidden] {
  display: none !important;
}

.csaia-whatsapp span {
  font-size: 15px;
}

.csaia-honeypot,
.csaia-sr-only {
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

@media (max-width: 520px) {
  .csaia-launch {
    bottom: 16px;
    min-height: 54px;
    right: 16px;
  }

  .csaia-panel {
    bottom: 82px;
    height: min(660px, calc(100dvh - 102px));
    max-height: calc(100dvh - 102px);
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .csaia-launch,
  .csaia-send,
  .csaia-whatsapp,
  .csaia-messages {
    scroll-behavior: auto;
    transition: none;
  }
}
