.reaction-shortcuts-editor {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #458fd780;
  background: #168bff12;
}
.reaction-shortcuts-heading, .reaction-shortcuts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}
.reaction-shortcuts-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  margin-block: 6px;
}
.reaction-shortcuts-editor button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #168bff18;
  color: inherit;
  cursor: pointer;
}
.reaction-shortcuts-slots button {
  padding: 2px;
}
.reaction-shortcuts-slots button[aria-pressed="true"] {
  border-color: #249aff;
  background: #168bff35;
}
.reaction-shortcuts-editor p {
  margin: 6px 0;
  font-size: 13px;
}

/* Quick-reaction picker header and editing controls. */
.reaction-picker-dialog:has(.reaction-shortcuts-editor) {
  --reaction-edge: #88b8ed42;
  --reaction-surface: #17263d;
  --reaction-tint: #63aaff17;
  --reaction-accent: #a9d4ff;
  --reaction-cta: #a9d4ff;
  --reaction-cta-text: #102036;
}
html[data-theme=light] .reaction-picker-dialog:has(.reaction-shortcuts-editor) {
  --reaction-edge: #27578c38;
  --reaction-surface: #edf5ff;
  --reaction-tint: #235eb110;
  --reaction-accent: #174981;
  --reaction-cta: #1a55a0;
  --reaction-cta-text: #fff;
}
.reaction-picker-dialog:has(.keyboard-emoji-picker):has(.reaction-shortcuts-editor) > .message-tool-heading {
  position: static;
  height: auto;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0 2px 6px 4px;
  border-bottom: 1px solid var(--reaction-edge);
}
.reaction-picker-dialog:has(.keyboard-emoji-picker):has(.reaction-shortcuts-editor) > .message-tool-heading h2 {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  font-size: 16px;
}
.reaction-picker-dialog:has(.keyboard-emoji-picker):has(.reaction-shortcuts-editor) > .message-tool-heading > button {
  position: static;
  width: 44px;
  height: 44px;
  background: var(--reaction-tint);
}
.reaction-picker-dialog .reaction-shortcuts-editor {
  padding: 9px;
  border: 1px solid var(--reaction-edge);
  border-radius: 14px;
  background: var(--reaction-surface);
}
.reaction-shortcuts-editor .reaction-shortcuts-heading strong { font-size: 14px; }
.reaction-shortcuts-editor .reaction-shortcuts-heading > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  min-height: 40px;
  color: var(--reaction-accent);
  font-weight: 600;
}
.reaction-shortcuts-editor .reaction-shortcuts-heading > button::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M16 4a2.8 2.8 0 0 1 4 4L9 19l-5 1 1-5ZM14.5 5.5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.reaction-shortcuts-editor .reaction-shortcuts-slots {
  gap: 4px;
  margin: 6px 0 0;
}
.reaction-shortcuts-editor .reaction-shortcuts-slots button {
  display: grid;
  place-items: center;
  min-height: 40px;
}
.reaction-picker-dialog .reaction-shortcuts-editor button { background: var(--reaction-tint); }
.reaction-shortcuts-editor button:hover { border-color: var(--reaction-edge); }
.reaction-picker-dialog .reaction-shortcuts-slots button[aria-pressed="true"] {
  border-color: var(--reaction-accent);
  background: var(--reaction-tint);
}
.reaction-shortcuts-editor .reaction-shortcuts-actions {
  justify-content: flex-end;
  margin-top: 8px;
}
.reaction-shortcuts-actions button {
  padding: 0 8px;
  font-size: 12px;
}
.reaction-picker-dialog .reaction-shortcuts-actions button:last-child {
  background: var(--reaction-cta);
  color: var(--reaction-cta-text);
  font-weight: 700;
}
.reaction-picker-dialog[open]:has(.reaction-shortcuts-editor) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reaction-picker-dialog:has(.reaction-shortcuts-editor) > :is(.message-tool-heading, .reaction-shortcuts-editor) {
  flex-shrink: 0;
}
.reaction-picker-dialog:has(.reaction-shortcuts-editor) > .keyboard-emoji-picker {
  flex: 0 1 auto;
  min-height: 180px;
}
