.platform-bubble p {
  white-space: pre-line;
  line-height: 1.58;
}

.platform-command-bar {
  display: none;
}

.platform-chat-open .conversation {
  grid-template-rows: 78px minmax(0, 1fr) auto !important;
}

.platform-chat-open .conversation-header {
  grid-row: 1 !important;
}

.platform-chat-open .pinned-message,
.platform-chat-open .composer {
  display: none !important;
}

.platform-chat-open .messages {
  position: relative;
  z-index: 1;
  grid-row: 2 !important;
  min-height: 0;
  overflow-y: auto;
}

.platform-chat-open .platform-command-bar {
  position: relative;
  z-index: 60;
  isolation: isolate;
  grid-row: 3 !important;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid #cad7cd;
  background-color: #f4f8ef;
  box-shadow: 0 -10px 28px rgb(13 27 20 / 14%);
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto;
  scrollbar-width: none;
}

.platform-command-bar::-webkit-scrollbar {
  display: none;
}

.platform-command-bar button {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #b9c9bc;
  border-radius: 13px;
  background-color: #eaf1e5;
  background-image: linear-gradient(145deg, #fff, #e4ecdd);
  color: #1d3025;
  box-shadow: 0 4px 12px rgb(25 49 34 / 12%);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
}

.platform-command-bar button:active,
.platform-command-bar button.is-loading {
  transform: scale(.96);
  border-color: #86b62e;
  background-color: #dfff98;
  background-image: linear-gradient(145deg, #efffc8, #cfee88);
  opacity: 1 !important;
}

html[data-theme="dark"] .platform-chat-open .platform-command-bar {
  border-color: #405348;
  background-color: #101b15;
  box-shadow: 0 -10px 28px rgb(0 0 0 / 42%);
}

html[data-theme="dark"] .platform-command-bar button {
  border-color: #58705f;
  background-color: #203126;
  background-image: linear-gradient(145deg, #263a2d, #18271e);
  color: #dfff87;
  box-shadow: 0 4px 14px rgb(0 0 0 / 30%);
}

html[data-theme="dark"] .platform-command-bar button:active,
html[data-theme="dark"] .platform-command-bar button.is-loading {
  border-color: #b9ee55;
  background-color: #314627;
  background-image: linear-gradient(145deg, #3d572e, #283c23);
  color: #efffc5;
}

@media (max-width: 700px) {
  .platform-chat-open .conversation {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  .platform-chat-open .platform-command-bar {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .platform-command-bar button {
    min-height: 42px;
    padding: 0 14px;
  }
}
