.papi-dock:not([open]) {
  width: auto !important;
}

.papi-dock-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 148px;
  padding: 13px 16px;
  color: #172b35;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.papi-dock-summary::-webkit-details-marker {
  display: none;
}

.papi-dock-spark {
  color: #087f79;
  font-size: 18px;
}

.papi-dock-summary-note {
  margin-left: auto;
  color: #6d7f86;
  font-size: 11px;
  font-weight: 500;
}

.papi-dock:not([open]) .papi-dock-summary-note {
  display: none;
}

.papi-dock-body {
  display: flex;
  flex-direction: column;
  height: min(720px, calc(100vh - 92px));
  border-top: 1px solid #e3e9eb;
}

.papi-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
}

.papi-dock-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.papi-dock-title {
  color: #172b35;
  font-size: 18px;
}

.papi-dock-status {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}

.papi-dock-status-ready {
  background: #dcefed;
  color: #086b65;
}

.papi-dock-status-offline {
  background: #f6e8d9;
  color: #8a5524;
}

.papi-dock-new-chat {
  border: 0;
  background: transparent;
  color: #087f79;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.papi-dock-context-bar {
  padding: 0 18px 10px;
  border-bottom: 1px solid #edf1f2;
}

.papi-dock-context,
.papi-dock-request-context {
  margin: 2px 0;
  color: #6a7b82;
  font-size: 11px;
  line-height: 1.35;
}

.papi-dock-request-context {
  color: #087f79;
  font-weight: 700;
}

.papi-conversation {
  height: 100%;
  box-sizing: border-box;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: #f7f9f9;
}

.papi-conversation-viewport {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.papi-conversation-viewport > .papi-conversation {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.papi-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 14px;
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow: 0 1px 2px rgba(23, 43, 53, 0.06);
  font-size: 13px;
  line-height: 1.48;
}

.papi-message p:last-child,
.papi-message ul:last-child,
.papi-message ol:last-child {
  margin-bottom: 0;
}

.papi-message-assistant,
.papi-message-error {
  margin-right: auto;
  border: 1px solid #dce6e7;
  background: #fff;
  color: #253b44;
}

.papi-message-user {
  margin-left: auto;
  background: #087f79;
  color: #fff;
}

.papi-message-user a {
  color: #fff;
}

.papi-message-error {
  border-color: #e9c3bd;
  background: #fff6f4;
  color: #8b4138;
}

.papi-message-welcome {
  max-width: 95%;
  color: #536970;
}

.papi-message-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
}

.papi-dock-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid #dfe6e8;
  background: #fff;
}

.papi-dock-input {
  min-height: 64px;
  max-height: 140px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #aebdc2;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
}

.papi-dock-input:focus {
  border-color: #087f79;
  outline: 2px solid rgba(8, 127, 121, 0.13);
}

.papi-dock-send {
  align-self: end;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 0 15px;
  background: #087f79;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.papi-dock-send:disabled {
  background: #afbdc0;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .papi-dock[open] {
    right: 12px !important;
    bottom: 12px !important;
    width: calc(100vw - 24px) !important;
  }

  .papi-dock-body {
    height: min(680px, calc(100vh - 70px));
  }

  .papi-message {
    max-width: 94%;
  }
}
