html[lang] dialog.legacy-insert-dialog {
  width: 350px;
  height: 300px;
  max-width: calc(100vw - 12px);
  padding: 0;
  border: 1px solid #555;
  border-radius: 0;
  background: #963a7d;
  color: #fff;
  font: 12px Arial;
}
html[lang] dialog.legacy-insert-dialog > header {
  height: 30px;
  min-height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 7px;
  background: #f0f0f0;
  color: #111;
}
html[lang] dialog.legacy-insert-dialog h2 {
  margin: 0;
  font: 12px Arial;
}
.legacy-insert-body {
  height: 222px;
  margin: 3px 5px;
  padding: 3px 5px;
  border: 1px solid #421b33;
}
.legacy-emoticon-selector {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  align-items: center;
  height: 196px;
}
.legacy-emoticon-grid {
  display: grid;
  grid-template-columns: repeat(6, 43px);
  grid-auto-rows: 41px;
  align-content: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}
html[lang] .legacy-emoticon-grid button {
  width: 37px;
  height: 35px;
  margin: 3px;
  padding: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: none;
}
html[lang] .legacy-emoticon-grid button[aria-pressed="true"] {
  border: 2px ridge #ddd;
  padding: 4px;
}
.legacy-emoticon-grid img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
html[lang] .legacy-emoticon-selector > button {
  width: 16px;
  min-width: 16px;
  height: 30px;
  padding: 0;
  font-size: 10px;
}
html[lang] dialog.legacy-insert-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 5px;
  margin: 0 5px;
  padding: 0;
}
html[lang] .legacy-insert-dialog footer .field {
  margin: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font: 12px Arial;
}
html[lang] .legacy-insert-dialog footer .field input {
  width: 13px;
  height: 13px;
  min-height: 13px;
}
html[lang] .legacy-insert-dialog footer > button {
  min-width: 48px;
  height: 24px;
  min-height: 24px;
  padding: 2px 5px;
  background: #000;
  color: #fff;
  border: 1px solid #111;
  border-radius: 3px;
}
.legacy-emoticon-options {
  padding: 10px;
}
.legacy-emoticon-options fieldset {
  display: flex;
  gap: 12px;
}
