.prompt-card.deckcraft-chat-mode {
  max-width: 820px;
  padding: 30px;
}

.deckcraft-chat-mode > form,
.deckcraft-chat-mode > .presets {
  display: none !important;
}

.deckcraft-chat-workspace {
  display: flex;
  flex-direction: column;
  min-height: 510px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #2c2c3a;
  border-radius: 16px;
  background: #0f0f16;
}

.deckcraft-chat-workspace[hidden] {
  display: none !important;
}

.deckcraft-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #262633;
  background: #15151d;
}

.deckcraft-chat-header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deckcraft-chat-header strong {
  color: #f2f2f7;
  font-size: 14px;
}

.deckcraft-chat-header div span {
  color: #858597;
  font-size: 11.5px;
}

.deckcraft-chat-ready {
  border: 1px solid #3a3a49;
  border-radius: 999px;
  color: #9a9aaa;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 700;
}

.deckcraft-chat-ready.is-ready {
  border-color: #4c8c5a;
  background: #19301f;
  color: #a9e7b7;
}

.deckcraft-chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  max-height: 360px;
  padding: 20px;
  overflow-y: auto;
}

.deckcraft-chat-message {
  display: flex;
  max-width: 82%;
  flex-direction: column;
  gap: 5px;
}

.deckcraft-chat-message.is-user {
  align-self: flex-end;
  align-items: flex-end;
}

.deckcraft-chat-author {
  color: #79798a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.deckcraft-chat-bubble {
  border: 1px solid #2b2b38;
  border-radius: 4px 15px 15px 15px;
  background: #181821;
  color: #dedee8;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.deckcraft-chat-message.is-user .deckcraft-chat-bubble {
  border-color: #4c3722;
  border-radius: 15px 4px 15px 15px;
  background: #332516;
  color: #fff3e5;
}

html[data-deckcraft-brand="immo"] .deckcraft-chat-message.is-user .deckcraft-chat-bubble {
  border-color: #275e57;
  background: #173934;
  color: #e8fffb;
}

.deckcraft-chat-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #858597;
  font-size: 11.5px;
}

.deckcraft-chat-thinking span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff9626;
  animation: chat-pulse 1s infinite alternate;
}

.deckcraft-chat-thinking span:nth-child(2) { animation-delay: .2s; }
.deckcraft-chat-thinking span:nth-child(3) { animation-delay: .4s; }

html[data-deckcraft-brand="immo"] .deckcraft-chat-thinking span {
  background: #3df5dc;
}

@keyframes chat-pulse {
  to { opacity: .25; transform: translateY(-2px); }
}

.deckcraft-chat-suggestions {
  display: flex;
  gap: 7px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.deckcraft-chat-suggestions button,
.deckcraft-chat-clear {
  flex: 0 0 auto;
  border: 1px solid #323240;
  border-radius: 999px;
  background: transparent;
  color: #a9a9b8;
  padding: 6px 10px;
  font-size: 11px;
}

.deckcraft-chat-suggestions button:hover,
.deckcraft-chat-clear:hover {
  border-color: #ff9626;
  color: #ffc484;
}

html[data-deckcraft-brand="immo"] .deckcraft-chat-suggestions button:hover,
html[data-deckcraft-brand="immo"] .deckcraft-chat-clear:hover {
  border-color: #3df5dc;
  color: #3df5dc;
}

.deckcraft-chat-attachment:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 12px;
}

.deckcraft-chat-document-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #343442;
  border-radius: 10px;
  background: #171720;
  color: #cfcfda;
  padding: 8px 10px;
  font-size: 12px;
}

.deckcraft-chat-document-chip button,
.deckcraft-chat-document-images button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #4b4b5a;
  border-radius: 50%;
  background: #20202a;
  color: #fff;
  padding: 0;
}

.deckcraft-chat-document-images {
  display: flex;
  gap: 8px;
  padding: 4px 2px;
  overflow-x: auto;
}

.deckcraft-chat-document-images > div {
  position: relative;
  flex: 0 0 auto;
}

.deckcraft-chat-document-images img {
  display: block;
  width: 54px;
  height: 54px;
  border: 1px solid #343442;
  border-radius: 8px;
  object-fit: cover;
}

.deckcraft-chat-document-images button {
  position: absolute;
  top: -6px;
  right: -6px;
}

.deckcraft-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 16px;
  border: 1px solid #373746;
  border-radius: 14px;
  background: #171720;
  padding: 8px;
}

.deckcraft-chat-composer:focus-within {
  border-color: #ff9626;
}

html[data-deckcraft-brand="immo"] .deckcraft-chat-composer:focus-within {
  border-color: #3df5dc;
}

.deckcraft-chat-input {
  min-height: 42px;
  max-height: 130px;
  flex: 1;
  resize: none;
  border: 0 !important;
  background: transparent !important;
  color: #f2f2f7;
  padding: 7px 8px !important;
  font-size: 13.5px;
  line-height: 1.45;
  outline: 0 !important;
}

.deckcraft-chat-send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #ff9626;
  color: #2d2116;
  font-size: 18px;
  font-weight: 800;
}

html[data-deckcraft-brand="immo"] .deckcraft-chat-send {
  background: #3df5dc;
  color: #103631;
}

.deckcraft-chat-send:disabled {
  opacity: .45;
}

.deckcraft-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px;
}

.deckcraft-chat-attach {
  cursor: pointer;
  color: #a9a9b8;
  font-size: 11.5px;
}

.deckcraft-chat-attach:hover {
  color: #fff;
}

.deckcraft-chat-build {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: #ff9626;
  color: #302216;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 800;
}

html[data-deckcraft-brand="immo"] .deckcraft-chat-build {
  background: #3df5dc;
  color: #103631;
}

.deckcraft-chat-build:disabled {
  cursor: default;
  opacity: .4;
}

@media (max-width: 760px) {
  .prompt-card.deckcraft-chat-mode { padding: 20px; }
  .deckcraft-chat-workspace { min-height: 560px; }
  .deckcraft-chat-messages { max-height: 330px; padding: 16px; }
  .deckcraft-chat-message { max-width: 94%; }
  .deckcraft-chat-actions { flex-wrap: wrap; }
  .deckcraft-chat-build { width: 100%; margin-left: 0; }
}
