/* StylesPanel: original 2x2 controls with 16px resource artwork. Native
   font metrics and InternalFrame placement await original GUI comparison. */
.legacy-styles-host {
  width: 40px;
  height: 52px;
  flex: 0 0 40px;
}
.legacy-styles-panel {
  display: grid;
  grid-template-columns: 18px 18px;
  grid-template-rows: 24px 24px;
  gap: 2px;
}
html[lang] .legacy-styles-panel button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 24px;
  padding: 0;
  border: 1px outset #ddd;
  border-radius: 0;
  background: #ddd;
  box-shadow: none;
}
.legacy-styles-panel img {
  width: 16px;
  height: 16px;
}
html[lang] .legacy-styles-panel button[aria-pressed="true"] {
  border-style: inset;
  background: #bbb;
}
html[lang] .legacy-styles-toggle {
  padding: 0;
  min-height: 10px;
  height: 10px;
  font: 12px Arial;
}
html[lang] body.chat-client .composer.has-inline-styles {
  grid-template-columns: minmax(0, 1fr) 40px 25px;
}
html[lang] body.chat-client .composer {
  position: relative;
}
html[lang] body.chat-client[data-chat-theme] .composer .formatting-toolbar {
  display: flex;
  flex-direction: column;
}
html[lang]
  body.chat-client[data-chat-theme]
  .composer
  .formatting-toolbar:has(.legacy-styles-toggle:not([hidden]))
  > button:last-child {
  height: 40px;
}
html[lang]
  body.chat-client[data-chat-theme]
  .composer
  .formatting-toolbar
  .legacy-styles-toggle {
  height: 10px;
  min-height: 10px;
  align-items: center;
}
.legacy-styles-separate {
  position: absolute;
  right: 28px;
  bottom: 58px;
  z-index: 20;
  height: 64px;
  width: 48px;
  padding: 10px 3px 2px;
  background: #ccc;
  border: 1px outset #eee;
  cursor: move;
  touch-action: none;
}
.pm-composer {
  position: relative;
}
.pm-composer.has-inline-styles {
  grid-template-columns: minmax(0, 1fr) 40px 25px var(--original-private-actions-width,76px);
}
.pm-composer-controls {
  display: flex;
  flex-direction: column;
}
.pm-composer-controls:has(.legacy-styles-toggle:not([hidden])) .pm-emoticons {
  height: 42px;
}
.legacy-styles-host[hidden],
.legacy-styles-panel[hidden],
.legacy-styles-panel button[hidden],
.legacy-styles-toggle[hidden] {
  display: none !important;
}
html[lang] body.chat-client #messages .message.custom-message-text .content,
html .pm-message.custom-message-text .content {
  color: var(--message-text);
}
html[lang] body.chat-client #messages .message.custom-message-background,
html .pm-message.custom-message-background {
  background: var(--message-background);
}
.legacy-text-styles-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
}
html[lang] body.chat-client #messages .message.inherit-message-style .content,
html .pm-message.inherit-message-style .content {
  font-weight: var(--reading-weight, 400);
  font-style: var(--reading-style, normal);
}
.legacy-text-styles-editor fieldset {
  display: flex;
  gap: 16px;
}
.legacy-text-styles-editor label {
  display: flex;
  align-items: center;
  gap: 4px;
}
