.rich-text-container * {
  box-sizing: border-box;
}

/* Container */
.rich-text-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: #fff;
  width: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 2px;
  min-height: fit-content;
}

/* Toolbar */
.rich-text-toolbar {
  padding: 0.5rem 0.25rem;
  border: 1px solid #ccced1;
  background-color: #f5f5f5;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* Dropdown */
.rich-text-toolbar .editor-dropdown {
  position: relative;
}

.rich-text-toolbar .editor-dropdown-display {
  outline: none;
  border: none;
  background-color: transparent;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
  min-width: fit-content;
  min-height: fit-content;
  width: 30px;
  height: 30px;
  padding: 0px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rich-text-toolbar .editor-dropdown-display:hover {
  outline: none;
  border: none;
  background-color: #f0f0f0;
}

.rich-text-toolbar .editor-dropdown-options {
  position: absolute;
  top: calc(100% + 10px);
  background-color: rgb(255, 255, 255);
  padding: 0.45rem;
  box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 3px;
  border: 1px solid #ccced1;
  z-index: 99;
}

.rich-text-toolbar .editor-dropdown-dialog {
  position: absolute;
  top: calc(100% + 10px);
  background-color: rgb(255, 255, 255);
  padding: 0.45rem;
  box-shadow: 2px 2px 6px 2px rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  border: 1px solid #ccced1;
  z-index: 99;
}

/* LINK DIALOG */
.editor-dropdown-link-dialog {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.editor-dropdown-link-dialog input {
  padding: 0.35rem 0.4rem;
  border: 1px solid #ccced1;
  outline: none;
}

.editor-dropdown-link-dialog input:focus {
  padding: 0.35rem 0.4rem;
  border: 1px solid #3779eb;
  box-shadow: rgb(202, 225, 252) 0px 0px 0px 3px,
    rgb(51, 51, 51) 0px 0px 0px 0px;
  outline: none;
}

.editor-dropdown-link-dialog .editor-dropdown-link__buttons {
  display: flex;
  width: 100%;
  gap: 0.2rem;
}

.editor-dropdown-link-dialog .editor-dropdown-link__buttons button {
  flex-grow: 1;
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-dropdown .dropdown-fontfamily-button {
  width: 100%;
  text-align: start;
  font-size: 14px;
  white-space: nowrap;
}

/* Button */
.rich-text-toolbar button {
  outline: none;
  border: none;
  background-color: transparent;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
  min-width: fit-content;
  min-height: fit-content;
  width: 30px;
  height: 30px;
  padding: 0px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rich-text-toolbar button:hover {
  outline: none;
  border: none;
  background-color: #dddddd;
}

.rich-text-toolbar button.btn-active,
.rich-text-toolbar .editor-dropdown-display.opened {
  color: #2977ff;
  background-color: #dbecff;
}

/* EVERY INPUT TYPE COLOR */
.rich-text-toolbar input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}
.rich-text-toolbar input[type="color"]::-webkit-color-swatch {
  border-radius: 2px;
  border: none;
}
.rich-text-toolbar input[type="color"]::-moz-color-swatch {
  border-radius: 2px;
  border: none;
}

/* Editor */
.rich-text-main {
  border: 1px solid #ccced1;
  overflow-y: auto;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  flex-grow: 1;
}

.rich-text-main > div {
  padding: 0.75rem;
  resize: none;
  width: 100%;
  background-color: transparent;
  outline: none;
  border: none;
  color: black;
  height: 100%;
}

.rich-text-main > div :where(ul, ol) {
  margin: 0px !important;
  padding: 0px !important;
  color: black;
  list-style-type: auto;
}

.rich-text-main > div li {
  list-style-position: inside !important;
}

.rich-text-main > div ul li {
  list-style-type: disc !important;
}
