.quote-chat {
  position: fixed;
  left: clamp(14px, 2.2vw, 28px);
  bottom: clamp(14px, 2.2vw, 28px);
  z-index: 90;
  font-family: Inter, "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.quote-chat__launcher {
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.3);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.quote-chat__launcher:hover,
.quote-chat__launcher:focus-visible {
  transform: translateY(-3px);
  background: #1d4ed8;
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.34);
}

.quote-chat__panel {
  position: absolute;
  left: 0;
  bottom: 62px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(219, 234, 254, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.quote-chat.is-open .quote-chat__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.quote-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e5eefb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.quote-chat__header strong,
.quote-chat__header span {
  display: block;
}

.quote-chat__header strong {
  color: #0f172a;
  font-size: 15px;
}

.quote-chat__header span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.quote-chat__close {
  width: 34px;
  height: 34px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.quote-chat__messages {
  min-height: 260px;
  max-height: 390px;
  overflow-y: auto;
  padding: 16px;
  background: #f8fbff;
}

.quote-chat__message {
  width: fit-content;
  max-width: 92%;
  margin-bottom: 10px;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
}

.quote-chat__message p {
  margin: 0 0 8px;
}

.quote-chat__message p:last-child {
  margin-bottom: 0;
}

.quote-chat__message--bot {
  background: #ffffff;
  color: #26344d;
  border: 1px solid #e2e8f0;
}

.quote-chat__message--user {
  margin-left: auto;
  background: #2563eb;
  color: #ffffff;
}

.quote-chat__suggestions {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.quote-chat__suggestion {
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  color: #1d4ed8;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.quote-chat__matches {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.quote-chat__matches li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.quote-chat__matches span {
  color: #334155;
}

.quote-chat__matches strong {
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 12px;
}

.quote-chat__fineprint {
  color: #64748b;
  font-size: 12px;
}

.quote-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
  background: #ffffff;
}

.quote-chat__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.quote-chat__action--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.quote-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
}

.quote-chat__input {
  min-width: 0;
  height: 42px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 0 14px;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.quote-chat__input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.quote-chat__form button {
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 520px) {
  .quote-chat {
    left: 12px;
    bottom: 72px;
  }

  .quote-chat__launcher {
    min-width: 64px;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }

  .quote-chat__panel {
    bottom: 56px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 140px);
  }
}

.quote-chat__message { white-space: pre-line; overflow-wrap: anywhere; }
.quote-chat__error { margin: 0; padding: 8px 14px; color: #a12720; font-size: 13px; }
.quote-chat__error:empty { padding: 0; }
.quote-chat__input[aria-invalid=true] { border: 2px solid #a12720; }
.quote-chat__actions { max-height: 145px; overflow-y: auto; }
.quote-chat__form[hidden] { display: none; }

.quote-chat__messages { min-height: 80px; }
.quote-chat__panel > :last-child { min-width: 0; }
.quote-chat__input { min-width: 0; }
