.bn-container.bn-shadcn.dark {
  --table-border: 228 100% 95%;
  --media-secondary-color: 240 3.7% 15%;
  --blocknote-placeholder: 240 3.7% 50%;

  --background: 240 10% 9%;
  --foreground: 0 0% 95%;
  --card: 240 10% 14%;
  --card-foreground: 0 0% 95%;
  --popover: 240 10% 9%;
  --popover-foreground: 0 0% 95%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 16%;
  --secondary: 240 3.7% 15%;
  --secondary-foreground: 0 0% 95%;
  --muted: 240 3.7% 25%;
  --muted-foreground: 240 5% 84.9%;
  --accent: 240 3.7% 25%;
  --accent-foreground: 0 0% 95%;
  --destructive: 0 62.8% 50%;
  --destructive-foreground: 0 0% 95%;
  --border: 240 3.7% 20%;
  --input: 240 3.7% 25%;
  --ring: 240 4.9% 83.9%;
  --success: 120 100% 40%;
}

.bn-shadcn {
  --blocknote-placeholder: 240 3.7% 50%;
  --bn-font-family: "Open Sans", ui-sans-serif, sans-serif;
}

/* To hide selction of file content when editor not editable */
.bn-editor[contenteditable="false"] .ProseMirror-selectednode > .bn-block-content > *,
.bn-editor[contenteditable="false"] .bn-block-content.ProseMirror-selectednode > * {
  outline: none !important;
}

/* To undable click on file buttons when editor not editable */
.bn-editor[contenteditable="false"] .bn-file-block-content-wrapper {
  cursor: default !important;
}
.bn-editor[contenteditable="false"] .bn-add-file-button {
  pointer-events: none !important;
}
/* To hide file buttons placeholders when editor not editable */
.bn-editor[contenteditable="false"] p.bn-add-file-button-text {
  display: none;
}

/* To hide formattingtoolbar when editor not editable */
.bn-container:has(.bn-editor[contenteditable="false"]) > [data-floating-ui-focusable] {
  display: none !important;
}

.bn-shadcn p {
  font-size: 0.888rem;
  font-weight: 300;
  line-height: 1.3;
  min-height: 1.3rem;
  overflow-wrap: anywhere;
  padding: 0;
}

.bn-shadcn.bn-container.inline > p {
  display: inline;
}

.bn-shadcn p:has(> .ProseMirror-trailingBreak)::before {
  color: hsl(var(--blocknote-placeholder));
}

.bn-editor[contenteditable="false"] .bn-block-content[data-content-type="codeBlock"] select {
  display: none;
}

.bn-shadcn code {
  font-size: 0.85em;
  line-height: 1rem;
  background: hsl(var(--input) / 0.5);
  padding: 0.15rem;
  border-radius: 0.25rem;
  color: #e8912d;
}
.bn-container.bn-shadcn.dark .bn-block-content[data-content-type="codeBlock"] {
  background: hsl(var(--input) / 0.5);
  border: 0.05rem solid hsl(var(--ring) / 0.4);
}
.bn-block-content[data-content-type="codeBlock"] code {
  background: transparent;
  padding: 0;
  border: none;
  border-radius: none;
  color: #fff;
}
.bn-block-content[data-content-type="codeBlock"] > pre {
  padding: 1.2rem 1rem 1rem;
}

.bn-add-file-button {
  visibility: hidden;
}

.bn-editor .bn-add-file-button {
  visibility: visible;
}

.bn-grid-suggestion-menu-item[aria-selected="true"],
.bn-grid-suggestion-menu-item:hover {
  background-color: hsl(var(--accent)) !important;
}

.bn-grid-suggestion-menu-empty-item,
.bn-grid-suggestion-menu-loader {
  padding: 0.5rem;
}

.bn-grid-suggestion-menu {
  max-height: 25rem !important;
  background-color: hsl(var(--popover)) !important;
  border: 0.05rem solid hsl(var(--border)) !important;
  border-radius: 8px !important;
  box-shadow: 0 0.05rem 4px 0 rgb(0 0 0 / 0.1) !important;
  gap: 0.75rem !important;
  padding: 0.5rem !important;
}

.bn-shadcn .bn-block-outer,
.bn-shadcn .bn-default-styles {
  font-family: "Open Sans", ui-sans-serif, sans-serif;
  font-size: 0.888rem;
  line-height: 1.3;
  -webkit-font-smoothing: auto;
}

.bn-container.bn-shadcn a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  text-decoration-color: hsl(var(--foreground) / 0.2);
}

.bn-link-toolbar > button.px-3 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  height: 2rem;
}

.bn-link-toolbar > button:hover {
  background-color: hsl(var(--muted));
}

.bn-container.bn-shadcn a:hover {
  text-decoration-color: hsl(var(--foreground));
}

.bn-container.bn-shadcn b,
.bn-container.bn-shadcn strong {
  font-weight: 600;
}

.bn-shadcn .bn-side-menu {
  position: relative;
  left: -0.6rem;
  top: -0.15rem;
}

@media (max-width: 639px) {
  .bn-shadcn .bn-side-menu {
    display: none !important;
  }
}

.prosemirror-dropcursor-block {
  border-radius: 2rem;
}

.bn-block .bn-editor {
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.bn-shadcn .bn-editor {
  white-space: pre-wrap !important;
  padding: 0px !important;
  background: transparent !important;
  height: 100%;
  width: 100%;
}

.bn-menu-dropdown {
  background-color: hsl(var(--popover));
  border: 0.05rem solid hsl(var(--border));
  position: fixed;
  z-index: 9999 !important;
  width: 11rem;
  max-height: 40vh !important;
  overflow-y: auto;
}

.bn-toolbar.bn-formatting-toolbar {
  padding: 0.25rem;
  gap: 0.5rem;
  background-color: hsl(var(--popover));
  border: 0.05rem solid hsl(var(--border));
}

.bn-toolbar.bn-formatting-toolbar button {
  height: 2rem;
  width: 2rem;
}

.bn-toolbar.bn-formatting-toolbar button:hover {
  background-color: hsl(var(--muted));
}

.bn-menu-item {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-start;
  align-items: center;
}

.bn-dropdown-button {
  display: inline-flex;
  gap: 0.15rem;
}

.slash-menu {
  max-height: 40vh;
  overflow-y: auto;
  background-color: hsl(var(--popover));
  border: 0.05rem solid hsl(var(--border)) !important;
  border-radius: 0.5rem;
  box-shadow: 0 0.05rem 0.3rem 0 rgb(0 0 0 / 0.1) !important;
  display: flex;
  flex-direction: column;
  height: fit-content;
  padding: 0.25rem;
}

.slash-menu-item {
  border-radius: 0.25rem;
  font-size: 0.888rem;
  min-width: 14rem;
  align-items: center;
  display: flex;
  height: 2.25rem;
  flex-direction: row;
  justify-content: space-between;
}

.slash-menu-item-badge {
  font-size: 0.8rem;
  min-width: 1rem;
  align-items: center;
  color: hsl(var(--muted-foreground));
  opacity: 0.5 !important;
  display: flex;
  padding: 0.125rem 0 0.125rem 0.25rem;
}

.slash-menu-separator {
  margin-top: 0.25rem !important;
  margin-bottom: 0.25rem !important;
}

.slash-menu-item[aria-selected="true"] {
  background-color: hsl(var(--accent));
}
.slash-menu-item:hover {
  background-color: hsl(var(--accent) / 0.6);
}

.notify {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  border-radius: 4px;
  min-height: 32px;
  padding: 4px;
}

.notify[data-notify-type="warning"] {
  background-color: #fff6e6;
}

.notify[data-notify-type="error"] {
  background-color: #ffe6e6;
}

.notify[data-notify-type="info"] {
  background-color: #e6ebff;
}

.notify[data-notify-type="success"] {
  background-color: #e6ffe6;
}

[data-color-scheme="dark"] .notify[data-notify-type="warning"] {
  background-color: #805d20;
}

[data-color-scheme="dark"] .notify[data-notify-type="error"] {
  background-color: #802020;
}

[data-color-scheme="dark"] .notify[data-notify-type="info"] {
  background-color: #203380;
}

[data-color-scheme="dark"] .notify[data-notify-type="success"] {
  background-color: #208020;
}

/* styles.css */
.no-hover-bg:hover {
  background-color: transparent !important;
}

.notify-icon-wrapper {
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 12px;
  margin-right: 12px;
  height: 18px;
  width: 18px;
  user-select: none;
  cursor: pointer;
}

.notify-icon[data-notify-icon-type="warning"] {
  color: #e69819;
}

.notify-icon[data-notify-icon-type="error"] {
  color: #d80d0d;
}

.notify-icon[data-notify-icon-type="info"] {
  color: #507aff;
}

.notify-icon[data-notify-icon-type="success"] {
  color: #0bc10b;
}

.inline-content {
  flex-grow: 1;
}

/* For showing saved checkListItem */
.bn-block-content[data-content-type="checkListItem"] > input {
  margin: 0;
  margin-inline-end: 0.5em;
  margin-bottom: 0.4em;
  cursor: pointer;
}

.bn-shadcn th {
  border: 0.05rem solid hsl(var(--table-border));
  border-collapse: collapse;
}
.bn-shadcn td {
  padding: 4px;
  border: 0.05rem solid hsl(var(--table-border));
  border-collapse: collapse;
}
