/* ==========================================
   QUILL EDITOR ENTERPRISE CUSTOM STYLING
   Ensures Quill is Always Visible, Elegant & Functional
   ========================================== */

.quill-wrapper {
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.quill-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* Toolbar styling */
.ql-toolbar.ql-snow {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    padding: 8px 12px !important;
    box-sizing: border-box;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.ql-snow .ql-stroke {
    stroke: #cbd5e1 !important;
}

.ql-snow .ql-fill {
    fill: #cbd5e1 !important;
}

.ql-snow .ql-picker {
    color: #cbd5e1 !important;
}

.ql-snow .ql-picker-options {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px !important;
    z-index: 10050 !important;
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow .ql-picker:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: #38bdf8 !important;
}

.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill {
    fill: #38bdf8 !important;
}

/* Editor Container */
.ql-container.ql-snow {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: none !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    color: #f1f5f9 !important;
    box-sizing: border-box;
    min-height: 150px !important;
    display: block !important;
    transition: all 0.25s ease;
}

.ql-editor {
    min-height: 150px !important;
    max-height: 360px !important;
    overflow-y: auto !important;
    padding: 14px 16px !important;
    line-height: 1.65 !important;
    color: #f1f5f9 !important;
}

.ql-editor.ql-blank::before {
    color: #64748b !important;
    font-style: normal !important;
    left: 16px !important;
    right: 16px !important;
}

.ql-container.ql-snow:focus-within {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

/* Modal dialog specific visibility guarantee */
.modal-card .ql-editor {
    min-height: 130px !important;
}

/* Rich text public output styling */
.doc-rich-content {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 14px;
    text-align: left;
}
.doc-rich-content p { margin-bottom: 6px; }
.doc-rich-content p:last-child { margin-bottom: 0; }
.doc-rich-content strong, .doc-rich-content b { font-weight: 700; color: #0f172a; }
.doc-rich-content ul, .doc-rich-content ol { padding-left: 20px; margin: 6px 0; }
.doc-rich-content ul { list-style: disc; }
.doc-rich-content ol { list-style: decimal; }
.doc-rich-content a { color: #A30000; text-decoration: underline; }
