@import url("@notelego/blocknote-core/style.css");

/* Default theme params */
.bn-container {
  --bn-colors-editor-text: #3f3f3f;
  --bn-colors-editor-background: #ffffff;
  --bn-colors-menu-text: #3f3f3f;
  --bn-colors-menu-background: #ffffff;
  --bn-colors-tooltip-text: #3f3f3f;
  --bn-colors-tooltip-background: #efefef;
  --bn-colors-hovered-text: #3f3f3f;
  --bn-colors-hovered-background: #efefef;
  --bn-colors-selected-text: #ffffff;
  --bn-colors-selected-background: #3f3f3f;
  --bn-colors-disabled-text: #afafaf;
  --bn-colors-disabled-background: #efefef;

  --bn-colors-shadow: #cfcfcf;
  --bn-colors-border: #efefef;
  --bn-colors-side-menu: #cfcfcf;

  --bn-colors-highlights-gray-text: #9b9a97;
  --bn-colors-highlights-gray-background: #ebeced;
  --bn-colors-highlights-brown-text: #64473a;
  --bn-colors-highlights-brown-background: #e9e5e3;
  --bn-colors-highlights-red-text: #e03e3e;
  --bn-colors-highlights-red-background: #fbe4e4;
  --bn-colors-highlights-orange-text: #d9730d;
  --bn-colors-highlights-orange-background: #f6e9d9;
  --bn-colors-highlights-yellow-text: #dfab01;
  --bn-colors-highlights-yellow-background: #fbf3db;
  --bn-colors-highlights-green-text: #4d6461;
  --bn-colors-highlights-green-background: #ddedea;
  --bn-colors-highlights-blue-text: #0b6e99;
  --bn-colors-highlights-blue-background: #ddebf1;
  --bn-colors-highlights-purple-text: #6940a5;
  --bn-colors-highlights-purple-background: #eae4f2;
  --bn-colors-highlights-pink-text: #ad1a72;
  --bn-colors-highlights-pink-background: #f4dfeb;

  --bn-font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Open Sans", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
    "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --bn-border-radius: 6px;

  /* Derived values */
  --bn-shadow-medium: 0 4px 12px var(--bn-colors-shadow);
  --bn-shadow-light: 0 2px 6px var(--bn-colors-border);
  --bn-border: 1px solid var(--bn-colors-border);
  --bn-border-radius-small: max(var(--bn-border-radius) - 2px, 1px);
  --bn-border-radius-medium: var(--bn-border-radius);
  --bn-border-radius-large: max(var(--bn-border-radius) + 2px, 1px);
}

.bn-container[data-color-scheme="dark"] {
  --bn-colors-editor-text: #cfcfcf;
  --bn-colors-editor-background: #1f1f1f;
  --bn-colors-menu-text: #cfcfcf;
  --bn-colors-menu-background: #1f1f1f;
  --bn-colors-tooltip-text: #cfcfcf;
  --bn-colors-tooltip-background: #161616;
  --bn-colors-hovered-text: #cfcfcf;
  --bn-colors-hovered-background: #161616;
  --bn-colors-selected-text: #cfcfcf;
  --bn-colors-selected-background: #0f0f0f;
  --bn-colors-disabled-text: #3f3f3f;
  --bn-colors-disabled-background: #161616;

  --bn-colors-shadow: #0f0f0f;
  --bn-colors-border: #161616;
  --bn-colors-side-menu: #7f7f7f;

  --bn-colors-highlights-gray-text: #bebdb8;
  --bn-colors-highlights-gray-background: #9b9a97;
  --bn-colors-highlights-brown-text: #8e6552;
  --bn-colors-highlights-brown-background: #64473a;
  --bn-colors-highlights-red-text: #ec4040;
  --bn-colors-highlights-red-background: #be3434;
  --bn-colors-highlights-orange-text: #e3790d;
  --bn-colors-highlights-orange-background: #b7600a;
  --bn-colors-highlights-yellow-text: #dfab01;
  --bn-colors-highlights-yellow-background: #b58b00;
  --bn-colors-highlights-green-text: #6b8b87;
  --bn-colors-highlights-green-background: #4d6461;
  --bn-colors-highlights-blue-text: #0e87bc;
  --bn-colors-highlights-blue-background: #0b6e99;
  --bn-colors-highlights-purple-text: #8552d7;
  --bn-colors-highlights-purple-background: #6940a5;
  --bn-colors-highlights-pink-text: #da208f;
  --bn-colors-highlights-pink-background: #ad1a72;
}

.bn-container {
  font-family: var(--bn-font-family);
}

/* Editor body styling */

/* Editor styling */
.bn-editor {
  background-color: var(--bn-colors-editor-background);
  border-radius: var(--bn-border-radius-large);
  color: var(--bn-colors-editor-text);
}

/* Custom block node view wrapper styling */
.bn-react-node-view-renderer {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Indent line styling */
.bn-block-group
  .bn-block-group
  .bn-block-outer:not([data-prev-depth-changed])::before {
  border-left: 0px solid var(--bn-colors-side-menu);
}

.bn-editor.bn-dragging
  .bn-block-group
  .bn-block-group
  .bn-block-outer:not([data-prev-depth-changed])::before {
  border-left-width: 1px;
}

/* Placeholder styling */
.bn-inline-content:has(> .ProseMirror-trailingBreak):before {
  color: var(--bn-colors-side-menu);
}

/* Color Icon styling */
.bn-container .bn-color-icon {
  align-items: center;
  border: var(--bn-border);
  border-radius: var(--bn-border-radius-small);
  display: flex;
  justify-content: center;
}

/* Error text styling */
.bn-error-text {
  color: red;
  font-size: 12px;
}

/* Highlight color styling */
[data-text-color="gray"] {
  color: var(--bn-colors-highlights-gray-text);
}

[data-text-color="brown"] {
  color: var(--bn-colors-highlights-brown-text);
}

[data-text-color="red"] {
  color: var(--bn-colors-highlights-red-text);
}

[data-text-color="orange"] {
  color: var(--bn-colors-highlights-orange-text);
}

[data-text-color="yellow"] {
  color: var(--bn-colors-highlights-yellow-text);
}

[data-text-color="green"] {
  color: var(--bn-colors-highlights-green-text);
}

[data-text-color="blue"] {
  color: var(--bn-colors-highlights-blue-text);
}

[data-text-color="purple"] {
  color: var(--bn-colors-highlights-purple-text);
}

[data-text-color="pink"] {
  color: var(--bn-colors-highlights-pink-text);
}

[data-background-color="gray"] {
  background-color: var(--bn-colors-highlights-gray-background);
}

[data-background-color="brown"] {
  background-color: var(--bn-colors-highlights-brown-background);
}

[data-background-color="red"] {
  background-color: var(--bn-colors-highlights-red-background);
}

[data-background-color="orange"] {
  background-color: var(--bn-colors-highlights-orange-background);
}

[data-background-color="yellow"] {
  background-color: var(--bn-colors-highlights-yellow-background);
}

[data-background-color="green"] {
  background-color: var(--bn-colors-highlights-green-background);
}

[data-background-color="blue"] {
  background-color: var(--bn-colors-highlights-blue-background);
}

[data-background-color="purple"] {
  background-color: var(--bn-colors-highlights-purple-background);
}

[data-background-color="pink"] {
  background-color: var(--bn-colors-highlights-pink-background);
}

/* Matching Side Menu height to block line height */
.bn-side-menu {
  height: 30px;
}

.bn-side-menu[data-block-type="heading"][data-level="1"] {
  height: 78px;
}

.bn-side-menu[data-block-type="heading"][data-level="2"] {
  height: 54px;
}

.bn-side-menu[data-block-type="heading"][data-level="3"] {
  height: 37px;
}

.bn-side-menu[data-block-type="file"] {
  height: 38px;
}

.bn-side-menu[data-block-type="audio"] {
  height: 60px;
}

.bn-side-menu[data-url="false"] {
  height: 54px;
}
