#dsc-chat-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9990;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
}

#dsc-chat-launcher {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  border: 1px solid rgba(193, 136, 214, 0.45);
  background: linear-gradient(135deg, #53007a, #007acc);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(83, 0, 122, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#dsc-chat-launcher:hover {
  transform: translateY(-2px);
}

#dsc-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(3.5rem + 0.75rem);
  width: min(360px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 6rem));
  display: none;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

#dsc-chat-panel.dsc-chat-panel--open {
  display: flex;
}

.dsc-chat-header {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(83, 0, 122, 0.5), rgba(0, 122, 204, 0.35));
  color: #fff;
}

.dsc-chat-header strong {
  display: block;
  font-size: 0.95rem;
}

.dsc-chat-header span {
  font-size: 0.75rem;
  opacity: 0.85;
}

.dsc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 200px;
  max-height: 280px;
}

.dsc-chat-bubble {
  max-width: 88%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.dsc-chat-bubble--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef6;
}

.dsc-chat-bubble--user {
  align-self: flex-end;
  background: rgba(0, 122, 204, 0.25);
  color: #fff;
}

.dsc-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.85rem 0.65rem;
}

.dsc-chat-quick button {
  border: 1px solid rgba(193, 136, 214, 0.35);
  background: rgba(89, 44, 148, 0.2);
  color: #e8d4f0;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.dsc-chat-compose {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dsc-chat-compose input,
.dsc-chat-compose textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111;
  color: #fff;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
}

.dsc-chat-compose textarea {
  min-height: 64px;
  resize: vertical;
}

.dsc-chat-compose-row {
  display: flex;
  gap: 0.45rem;
}

.dsc-chat-send {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 0.55rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #592c94, #007acc);
}

.dsc-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dsc-chat-close {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #ccc;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  #dsc-chat-root {
    right: 0.75rem;
    bottom: 4.5rem;
  }
}
