/* Rich Text Editor Styles */

.rich-text-wrapper {
    overflow: visible;
    padding: 0;
}

.rich-text-editor {
    width: 100%;
}

.ql-toolbar.ql-snow {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8f9fa;
    padding: 8px;
}

.ql-container.ql-snow {
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    height: auto;
    overflow: visible;
}

.ql-editor {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    height: auto;
}

.ql-editor h1, .ql-editor h2, .ql-editor h3, .ql-editor h4, .ql-editor h5, .ql-editor h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.ql-editor p {
    margin-bottom: 1em;
}

.ql-editor ol, .ql-editor ul {
    margin-bottom: 1em;
}

.ql-editor li::before {
    content: none !important;
    display: none !important;
}

.ql-editor li {
    list-style: none !important;
}

.ql-editor li[data-list=bullet],
.ql-editor li[data-list=checked],
.ql-editor li[data-list=unchecked] {
    counter-increment: none !important;
}

.ql-editor a {
    color: #0d6efd;
    text-decoration: underline;
}

.ql-tooltip {
    z-index: 1000;
}

/* Rich Text Preview for list view */
.rich-text-preview {
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.rich-text-preview:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
}

.rich-text-preview img {
    max-height: 50px;
    max-width: 100px;
    object-fit: cover;
    margin-right: 5px;
    display: inline-block;
}

.rich-text-preview * {
    margin: 0;
    padding: 0;
}

.rich-text-preview h1, 
.rich-text-preview h2, 
.rich-text-preview h3,
.rich-text-preview h4,
.rich-text-preview h5,
.rich-text-preview h6 {
    display: inline;
    font-size: inherit;
    font-weight: bold;
}


.ql-table-properties-form .properties-form-row {
    padding-top: 18px !important;
}

.ql-table-properties-form .label-field-view-input-wrapper {
    height: 30px !important;
    overflow: visible !important;
}

.ql-table-properties-form .label-field-view-input-wrapper > label {
    top: -14px !important;
    left: 4px !important;
    transform: scale(0.85) !important;
    transform-origin: left center !important;
    background: #fff !important;
    padding: 0 2px !important;
    white-space: nowrap !important;
    z-index: 2 !important;
    pointer-events: none !important;
    line-height: 1 !important;
}
