@tailwind base;
@tailwind components;
@tailwind utilities;

div:focus-visible {
  @apply ring-offset-0 ring-0 outline-none;
}

html,
body {
  font-family: "Satoshi", sans-serif;
  /* -webkit-font-smoothing: antialiased; */
}

.tiptap-editor li p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.tiptap-editor li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@layer base {
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

hr.ProseMirror-selectednode {
  border-top: 1px solid #68cef8;
}

.tiptap-editor mark {
  background-color: #ffe066;
  border-radius: 0.25em;
  box-decoration-break: clone;
  padding: 0.125em 0;
}

.tiptap-editor .items {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0px 10px 20px rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
  font-size: 0.9rem;
  overflow: hidden;
  padding: 0.2rem;
  position: relative;
}

.tiptap-editor .item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  display: block;
  margin: 0;
  padding: 0.2rem 0.4rem;
  text-align: left;
  width: 100%;
}

.tiptap-editor .mention {
  border: 1px solid #000;
  border-radius: 0.4rem;
  box-decoration-break: clone;
  padding: 0.1rem 0.3rem;
}

.tiptap-editor .item .is-selected {
  border-color: #000;
}

/* Give a remote user a caret */
.tiptap-editor .collaboration-cursor__caret {
  border-left: 1px solid #0d0d0d;
  border-right: 1px solid #0d0d0d;
  margin-left: -1px;
  margin-right: -1px;
  pointer-events: none;
  position: relative;
  word-break: normal;
}

/* Render the username above the caret */
.tiptap-editor .collaboration-cursor__label {
  border-radius: 3px 3px 3px 0;
  color: #0d0d0d;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  left: -1px;
  line-height: normal;
  padding: 0.1rem 0.3rem;
  position: absolute;
  top: -1.4em;
  user-select: none;
  white-space: nowrap;
}

.editor__header .menu-item {
  background-color: transparent;
  border: none;
  border-radius: 0.4rem;
  color: #0d0d0d;
  height: 1.75rem;
  margin-right: 0.25rem;
  padding: 0.25rem;
  width: 1.75rem;
  display: block;
}

.editor__header button {
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor__header i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor__header .menu-item i {
  fill: currentColor;
  height: 100%;
  width: 100%;
}

.editor__header .menu-item:hover,
.editor__header .menu-item .is-active {
  background-color: #0d0d0d;
  color: #fff;
}

.editor__header .ProseMirror h1.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #ced4da;
  pointer-events: none;
  height: 0;
}

.tiptap-editor h1 {
  @apply text-2xl mb-2;
  font-weight: 700;
}

.tiptap-editor h2 {
  @apply text-xl mb-2;
  font-weight: 700;
}

.tiptap-editor h3 {
  @apply text-lg mb-2;
  font-weight: 700;
}

.tiptap-editor h4 {
  @apply text-base mb-2;
  font-weight: 700;
}

.tiptap-editor ul[data-type="taskList"] {
  list-style: none;
  padding: 0;
}
.tiptap-editor ul[data-type="taskList"] p {
  margin: 0;
}
.tiptap-editor ul[data-type="taskList"] li {
  display: flex;
}
.tiptap-editor ul[data-type="taskList"] li > label {
  flex: 0 0 auto;
  margin-right: 0.5rem;
  user-select: none;
  display: flex;
  /* align-items: center; */
}
.tiptap-editor ul[data-type="taskList"] li > div {
  flex: 1 1 auto;
  margin-bottom: 0 !important;
}
.tiptap-editor ul[data-type="taskList"] li > label {
  margin-top: 0.5rem !important;
}
.tiptap-editor ul[data-type="taskList"] li > div > ul[data-type="taskList"] {
  margin-top: 0rem !important;
  margin-bottom: 0rem !important;
}

.tiptap-editor ol > li > ol {
  margin-top: 0rem !important;
  margin-bottom: 0rem !important;
}

.tiptap-editor ul > li > ul {
  margin-top: 0rem !important;
  margin-bottom: 0rem !important;
}

.tiptap-editor ul > li::marker {
  color: rgb(107, 114, 128) !important;
}

.sidebar-toolkit button i {
  display: flex;
  align-items: center;
}
