/* Luma editor V4 */

.brand-mark {
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(145deg, #7357ff 0%, #4b8cff 58%, #36cfc9 100%);
  box-shadow: 0 5px 14px rgba(75, 113, 255, 0.22);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand {
  letter-spacing: -0.02em;
}

/* Return the block control to the left and remove the blue bracket indicator. */
.block-row,
.block-row.active,
.block-row.multi-selected {
  padding-right: 0;
  padding-left: 54px;
  box-shadow: none !important;
}

.block-row.active {
  background: transparent;
}

.block-handle {
  right: auto;
  left: 2px;
}

.type-bullet,
.type-numbered {
  padding-right: 0;
  padding-left: 76px;
}

.list-marker {
  left: 56px;
}

.list-marker.numbered {
  left: 53px;
}

.type-quote {
  padding-right: 0;
  padding-left: 68px;
}

.type-quote::before {
  left: 56px;
}

/* Compact header and content-aware code height. */
.code-block {
  margin-top: 10px;
  border-radius: 10px;
}

.code-block .special-head {
  height: 42px;
  padding: 0 12px;
}

.mac-code-dots {
  gap: 6px;
}

.mac-code-dots i {
  width: 10px;
  height: 10px;
}

.code-block .code-language {
  height: 27px;
  font-size: 12px;
}

.code-copy-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.code-block .code-editor-wrap,
.code-block.code-is-empty .code-editor-wrap {
  min-height: 84px;
}

.code-block .code-source,
.code-block .code-highlight,
.code-block.code-is-empty .code-source,
.code-block.code-is-empty .code-highlight {
  min-height: 84px;
  padding: 14px 20px 16px;
  font-size: 14px;
  line-height: 1.8;
}

.code-block .code-source {
  height: 84px;
  resize: vertical;
}

/* Pasted images are responsive and retain their resized inline width. */
.note-image-frame {
  position: relative;
  display: block;
  width: min(100%, 720px);
  min-width: 96px;
  max-width: 100%;
  margin: 12px 0 16px;
  overflow: hidden;
  resize: horizontal;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface-soft);
  line-height: 0;
  cursor: default;
}

.note-image-frame:hover,
.note-image-frame:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.note-image-frame::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  content: "";
  pointer-events: none;
}

.note-image-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
}

/* Borderless document table, matching the light Feishu-like reference. */
.note-table-shell {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.note-table-tools {
  height: 28px;
  margin-bottom: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.note-table-scroll {
  overflow-x: auto;
}

.note-table-shell table {
  min-width: 520px;
  border-collapse: collapse;
}

.note-table-shell th,
.note-table-shell td {
  height: 46px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent !important;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.note-table-shell th {
  border-bottom-color: var(--border);
  font-variation-settings: "wght" 680;
  font-weight: 680;
}

.note-table-shell tr:last-child td {
  border-bottom: 0;
}

.note-table-shell th:focus,
.note-table-shell td:focus {
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 5%, transparent) !important;
  box-shadow: inset 0 0 0 2px var(--accent);
}

@media (max-width: 620px) {
  .block-row,
  .block-row.active,
  .block-row.multi-selected {
    padding-right: 0;
    padding-left: 40px;
  }

  .block-handle {
    right: auto;
    left: 0;
  }

  .type-bullet,
  .type-numbered {
    padding-left: 58px;
  }

  .list-marker,
  .list-marker.numbered {
    left: 39px;
  }

  .type-quote {
    padding-left: 52px;
  }

  .type-quote::before {
    left: 42px;
  }

  .code-block .code-source,
  .code-block .code-highlight,
  .code-block.code-is-empty .code-source,
  .code-block.code-is-empty .code-highlight {
    padding: 13px 14px 15px;
    font-size: 13px;
  }
}
