.clara-v2-legacy {
  display: none !important;
}

.clara-v2-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 16px 7px 7px;
  border: 1px solid #d9e2f7;
  border-radius: 999px;
  color: #0b1739;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 51, 112, .22);
  cursor: pointer;
  font: 800 15px/1.1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.clara-v2-launcher:hover {
  border-color: #9db5f7;
  transform: translateY(-1px);
}

.clara-v2-launcher:focus-visible,
.clara-v2-panel button:focus-visible,
.clara-v2-panel textarea:focus-visible,
.clara-v2-panel a:focus-visible {
  outline: 3px solid rgba(21, 87, 255, .35);
  outline-offset: 2px;
}

.clara-v2-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6651ff, #0759ff 72%);
  font-size: 20px;
}

.clara-v2-online {
  width: 9px;
  height: 9px;
  margin-left: 2px;
  border-radius: 50%;
  background: #20c85a;
  box-shadow: 0 0 0 3px rgba(32, 200, 90, .12);
}

.clara-v2-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 116px));
  overflow: hidden;
  border: 1px solid #d8e1f5;
  border-radius: 20px;
  color: #0b1739;
  background: #fff;
  box-shadow: 0 26px 75px rgba(19, 42, 98, .28);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

.clara-v2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid #e1e7f5;
  background: linear-gradient(135deg, #f7f9ff, #eef3ff);
}

.clara-v2-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clara-v2-identity strong,
.clara-v2-identity small {
  display: block;
}

.clara-v2-identity strong {
  font-size: 15px;
}

.clara-v2-identity small {
  margin-top: 2px;
  color: #52648d;
  font-size: 12px;
}

.clara-v2-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d8e1f5;
  border-radius: 10px;
  color: #26385e;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.clara-v2-messages {
  display: flex;
  min-height: 230px;
  padding: 16px;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 11px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fbfcff;
}

.clara-v2-message {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid #dfe6f5;
  border-radius: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.48;
}

.clara-v2-message--assistant {
  align-self: flex-start;
  background: #f0f4ff;
  border-bottom-left-radius: 5px;
}

.clara-v2-message--user {
  align-self: flex-end;
  color: #fff;
  background: #1557ff;
  border-color: #1557ff;
  border-bottom-right-radius: 5px;
}

.clara-v2-message--pending {
  color: #647398;
  font-style: italic;
}

.clara-v2-quick-replies {
  display: flex;
  gap: 7px;
  padding: 0 14px 12px;
  overflow-x: auto;
  background: #fbfcff;
}

.clara-v2-quick-replies button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cbd8f7;
  border-radius: 999px;
  color: #1949bb;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.clara-v2-form {
  padding: 12px 14px 10px;
  border-top: 1px solid #e1e7f5;
  background: #fff;
}

.clara-v2-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.clara-v2-compose textarea {
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #cfd9ef;
  border-radius: 11px;
  color: #0b1739;
  background: #fff;
  font: 14px/1.35 inherit;
}

.clara-v2-send {
  min-width: 72px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #1557ff;
  cursor: pointer;
  font-weight: 800;
}

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

.clara-v2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #68789d;
  font-size: 11px;
}

.clara-v2-footer a {
  color: #1557ff;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 620px) {
  .clara-v2-launcher {
    right: 12px;
    bottom: 12px;
    min-height: 54px;
  }

  .clara-v2-panel {
    right: 10px;
    bottom: 76px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 94px);
    border-radius: 16px;
  }

  .clara-v2-messages {
    min-height: 200px;
  }
}
