.tr-core-editor-surface {
  position: relative;
  display: grid;
  gap: 14px;
}

.tr-core-editor-frame {
  position: relative;
  min-height: 320px;
  border: 1px solid #d7dee9;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 35px,
      rgba(203, 213, 225, 0.45) 35px,
      rgba(203, 213, 225, 0.45) 36px
    );
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.tr-core-editor-frame.is-document {
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff, #fdfefe),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 35px,
      rgba(203, 213, 225, 0.4) 35px,
      rgba(203, 213, 225, 0.4) 36px
    );
}

.tr-core-editor-canvas {
  min-height: 320px;
  padding: 38px 42px;
  outline: none;
  line-height: 1.85;
  font-size: 16px;
  color: #132238;
}

.tr-core-editor-canvas > *:first-child {
  margin-top: 0;
}

.tr-core-editor-canvas h1,
.tr-core-editor-canvas h2,
.tr-core-editor-canvas h3 {
  margin: 0 0 12px;
  line-height: 1.22;
  color: #14213a;
}

.tr-core-editor-canvas p,
.tr-core-editor-canvas ul,
.tr-core-editor-canvas ol,
.tr-core-editor-canvas blockquote {
  margin: 0 0 12px;
}

.tr-core-editor-canvas blockquote {
  padding: 12px 16px;
  border-left: 4px solid #5b63f6;
  background: rgba(91, 99, 246, 0.06);
  border-radius: 0 14px 14px 0;
}

.tr-core-editor-canvas hr {
  border: 0;
  border-top: 1px solid #cbd5e1;
  margin: 18px 0;
}

.tr-core-editor-canvas a.tr-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.tr-core-editor-floating-toolbar {
  position: fixed;
  z-index: 1200;
  display: none;
  align-items: center;
  flex-wrap: wrap;
  max-width: calc(100vw - 16px);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.tr-core-editor-floating-toolbar.is-open {
  display: inline-flex;
}

.tr-core-editor-floating-toolbar button,
.tr-core-editor-floating-toolbar select {
  border: 1px solid transparent;
  background: transparent;
  color: #132238;
  border-radius: 11px;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.tr-core-editor-floating-toolbar select {
  min-width: 92px;
  appearance: none;
  background:
    linear-gradient(180deg, rgba(248,250,252,0.95), rgba(255,255,255,0.95));
  border-color: #e2e8f0;
}

.tr-core-editor-floating-toolbar button:hover,
.tr-core-editor-floating-toolbar select:hover,
.tr-core-editor-floating-toolbar button.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3146d6;
  transform: translateY(-1px);
}

.tr-core-editor-floating-toolbar .tr-toolbar-divider {
  width: 1px;
  height: 26px;
  background: #d7dee9;
  margin: 0 2px;
}

.tr-core-editor-slash-menu {
  position: fixed;
  z-index: 1190;
  display: none;
  width: 260px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
  padding: 8px;
}

.tr-core-editor-slash-menu.is-open {
  display: block;
}

.tr-core-editor-slash-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.tr-core-editor-slash-item:hover,
.tr-core-editor-slash-item.is-active {
  background: #f1f5ff;
}

.tr-core-editor-slash-item strong {
  font-size: 14px;
  color: #132238;
}

.tr-core-editor-slash-item span {
  font-size: 12px;
  color: #64748b;
}

.tr-core-editor-fieldbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tr-core-editor-hint {
  color: #64748b;
  font-size: 12px;
}
