/* Custom chat CSS handbook
   Owns only the editor/guide UI inside chat settings. */

.chat-css-customizer {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e2e2de;
  border-radius: 18px;
  background: #fff;
}

.chat-css-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.chat-css-heading .builder-label {
  margin: 0;
  color: #595955;
}

.chat-css-heading > button,
.chat-css-helper-actions > button {
  min-height: 32px;
  border: 1px solid #dfdfda;
  border-radius: 10px;
  color: #4f4f4b;
  background: #f7f7f4;
  font: 600 8px/1 var(--font-family);
}

.chat-css-heading > button {
  flex: 0 0 auto;
  padding: 0 11px;
}

.chat-css-customizer .css-editor {
  min-height: 148px;
  border-color: #deded9;
  border-radius: 13px;
  background: #fbfbf9;
  color: #292927;
  line-height: 1.62;
  tab-size: 2;
}

.chat-css-customizer .settings-button-row {
  margin-top: 9px;
}

.chat-css-customizer .settings-button-row #applyChatCss {
  border-color: #252523;
  color: #fff;
  background: #252523;
}

.chat-css-helper-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.chat-css-customizer > .char-note {
  margin: 9px 2px 0;
  color: #878782;
  font-size: 8px;
}

.chat-css-guide[hidden] { display: none !important; }

.chat-css-guide {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #e6e6e1;
  color: #41413e;
}

.chat-css-guide section + section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #ecece7;
}

.chat-css-guide h3 {
  margin: 0 0 8px;
  color: #282826;
  font: 650 13px/1.3 var(--font-family);
}

.chat-css-guide h4 {
  margin: 12px 0 6px;
  color: #4d4d49;
  font: 650 9px/1.35 var(--font-family);
}

.chat-css-guide p,
.chat-css-guide li {
  color: #6d6d68;
  font: 400 9px/1.65 var(--font-family);
}

.chat-css-guide p { margin: 6px 0; }
.chat-css-guide ol,
.chat-css-guide ul { margin: 7px 0; padding-left: 18px; }
.chat-css-guide li + li { margin-top: 4px; }

.chat-css-guide code {
  padding: 2px 4px;
  border-radius: 5px;
  color: #343431;
  background: #efefeb;
  font: 500 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.chat-css-guide pre {
  box-sizing: border-box;
  max-width: 100%;
  margin: 8px 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid #e2e2dd;
  border-radius: 12px;
  color: #30302d;
  background: #f7f7f4;
  font: 500 8px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-overflow-scrolling: touch;
}

.chat-css-map {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.chat-css-map > div {
  display: grid;
  grid-template-columns: minmax(86px, .85fr) minmax(0, 1.4fr);
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f7f7f4;
}

.chat-css-map strong {
  color: #4d4d49;
  font: 600 8px/1.45 var(--font-family);
}

.chat-css-map span {
  min-width: 0;
  color: #777772;
  font: 400 8px/1.5 var(--font-family);
  overflow-wrap: anywhere;
}

.chat-css-callout {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-left: 2px solid #31312f;
  border-radius: 0 9px 9px 0;
  background: #f4f4f0;
}

.chat-css-feedback {
  min-height: 1.4em;
  margin: 8px 2px 0;
  color: #60605c;
  font: 600 8px/1.4 var(--font-family);
}

@media (max-width: 360px) {
  .chat-css-customizer { padding: 12px; }
  .chat-css-helper-actions { grid-template-columns: 1fr; }
  .chat-css-map > div { grid-template-columns: 1fr; gap: 4px; }
}
/* Chat aesthetics are shared as chat-only cards. Other apps own their themes. */
.theme-scope-list { grid-template-columns: minmax(0, 1fr) !important; }
.theme-scope-list > [data-theme-scope="desktop"],
.theme-scope-list > [data-theme-scope="bundle"] { display: none !important; }
