.text-editor {
  position: relative;
}

.text-editor,
.text-editor p {
  margin: 0;
}

.text-editor h1,
.text-editor .h1,
.text-editor h2,
.text-editor .h2,
.text-editor h3,
.text-editor .h3 {
  font-weight: 700;
}

.text-editor b,
.text-editor strong {
  font-weight: 700 !important;
}

.text-editor .ql-align-center {
  text-align: center !important;
}

.text-editor .ql-align-left {
  text-align: left !important;
}

.text-editor .ql-align-right {
  text-align: right !important;
}

.text-editor .text-link {
  color: rgba(var(--customize-text-link), 1) !important;
  text-decoration: none !important;
  /* background-color: rgba(var(--customize-color-primary),0.1);
    border-radius: 10px;
    padding: 0 10px; */
}

.text-editor .text-link:hover {
  color: rgba(var(--customize-text-link-hover), 1) !important;
}

.text-editor h1,
.text-editor .h1 {
  font-size: var(--customize-h1-font-size);
  line-height: var(--customize-h1-line-height);
}

.text-editor h2,
.text-editor .h2 {
  font-size: var(--customize-h2-font-size);
  line-height: var(--customize-h2-line-height);
}

.text-editor h3,
.text-editor .h3 {
  font-size: var(--customize-h3-font-size);
  line-height: var(--customize-h3-line-height);
}

.text-editor h4,
.text-editor .h4 {
  font-size: var(--customize-h4-font-size);
  line-height: var(--customize-h4-line-height);
}

.text-editor h5,
.text-editor .h5 {
  font-size: var(--customize-h5-font-size);
  line-height: var(--customize-h5-line-height);
}

.text-editor h6,
.text-editor .h6 {
  font-size: var(--customize-h6-font-size);
  line-height: var(--customize-h6-line-height);
}

.text-editor img {
  max-width: 100% !important;
  border-radius: 20px;
  overflow: hidden;
}

.text-editor ol,
.text-editor ul {
  margin: 0;
  padding: 0 0 0 30px;
}

/* ol */
.text-editor ol {
  counter-reset: item;
  list-style: none;
  padding-left: 30px;
}

.text-editor ol>li {
  counter-increment: item;
  /* margin-bottom: 0.5em; */
  position: relative;
}

.text-editor ol>li::before {
  content: counter(item) ". ";
  position: absolute;
  left: -30px;
}

.text-editor ol ol {
  counter-reset: subitem;
  list-style: none;
  padding-left: 40px;
}

.text-editor ol ol>li {
  counter-increment: subitem;
  position: relative;
  /* margin-bottom: 0.3em; */
}

.text-editor ol ol>li::before {
  content: counter(item) "." counter(subitem) " ";
  position: absolute;
  left: -40px;
}

.text-editor table {
  width: 100% !important;
  border-collapse: separate !important;
  /* Changed from collapse to separate to allow border-radius */
  border-spacing: 0 !important;
  border: 1px solid rgba(var(--customize-border-color-gray), 0.3) !important;
  border-radius: var(--customize-table-border-radius) !important;
  overflow: hidden !important;
  background: none !important;
}

.text-editor table th,
.text-editor table td {
  border: none !important;
  /* Reset default border */
  border-bottom: 1px solid rgba(var(--customize-border-color-gray), 0.3) !important;
  border-right: 1px solid rgba(var(--customize-border-color-gray), 0.3) !important;
  padding: 15px 15px !important;
}

/* Remove border on the last column to prevent double borders */
.text-editor table tr th:last-child,
.text-editor table tr td:last-child {
  border-right: none !important;
}

/* Remove bottom border on the last row */
.text-editor table tbody tr:last-child th,
.text-editor table tbody tr:last-child td {
  border-bottom: none !important;
}

.text-editor table thead {
  /* background-color: rgba(var(--customize-color-secondary-light), 1) !important; */
  background-color: rgba(var(--customize-color-gray), 0.2) !important;
}

.text-editor table thead tr,
.text-editor table thead th {
  background: none !important;
}

.text-editor table tbody tr:nth-child(odd) {
  background-color: rgba(var(--customize-color-white), 1) !important;
}

.text-editor table tbody tr:nth-child(even) {
  background-color: rgba(var(--customize-color-gray-light), 1) !important;
}

.text-editor blockquote {
  position: relative;
  margin: 25px 0;
  /* padding: 25px 30px 25px 60px; */
  padding: 25px 0 25px 60px;
  border-left: 4px solid rgba(var(--customize-color-primary), 0.2);
  border-radius: 0;
  background: linear-gradient(to right, rgba(var(--customize-color-primary-light), 1), rgba(var(--customize-color-secondary-light), 0.5), rgba(var(--customize-color-secondary-light), 0));
  /* background: linear-gradient(90deg,
    rgba(var(--customize-color-gray), 0.2) 0%,
    rgba(var(--customize-color-white), 0) 100%); */
}

.text-editor blockquote:before {
  font-family: 'basic-icons' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  content: "\e9a0";
  position: absolute;
  left: 20px;
  top: 25px;
  color: rgba(var(--customize-color-primary), 1);
  font-size: 24px;
}

.text-editor blockquote strong {
  color: rgba(var(--customize-color-primary), 1);
}