/* Custom Font Declarations */
@font-face {
    font-family: 'TimesNewRoman';
    src: url(asset-path('Times.ttc')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'TimesNewRoman';
    src: url(asset-path('Times.ttc')) format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TimesNewRoman';
    src: url(asset-path('Times.ttc')) format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Helvetica';
    src: url(asset-path('Helvetica.ttc')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Helvetica';
    src: url(asset-path('Helvetica.ttc')) format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Palatino';
    src: url(asset-path('Palatino.ttc')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Arial';
    src: url(asset-path('Arial.ttf')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Courier';
    src: url(asset-path('Courier.ttf')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Monaco';
    src: url(asset-path('Monaco.ttf')) format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Font dropdown styling */
.ql-picker-item[data-value="timesnewroman"]::before,
.ql-picker-label[data-value="timesnewroman"]::before {
    font-family: "TimesNewRoman", Times, serif !important;
    content: "Times New Roman" !important;
}

.ql-picker-item[data-value="helvetica"]::before,
.ql-picker-label[data-value="helvetica"]::before {
    font-family: "Helvetica", Arial, sans-serif !important;
    content: "Helvetica" !important;
}

.ql-picker-item[data-value="palatino"]::before,
.ql-picker-label[data-value="palatino"]::before {
    font-family: "Palatino", "Book Antiqua", serif !important;
    content: "Palatino" !important;
}

.ql-picker-item[data-value="arial"]::before,
.ql-picker-label[data-value="arial"]::before {
    font-family: "Arial", Helvetica, sans-serif !important;
    content: "Arial" !important;
}

.ql-picker-item[data-value="courier"]::before,
.ql-picker-label[data-value="courier"]::before {
    font-family: "Courier", "Courier New", monospace !important;
    content: "Courier" !important;
}

.ql-picker-item[data-value="Monaco"]::before,
.ql-picker-label[data-value="Monaco"]::before {
    font-family: "Monaco", "Monaco", monospace !important;
    content: "Monaco" !important;
}

/* Font application to editor content */
.ql-font-timesnewroman {
    font-family: "TimesNewRoman", Times, serif !important;
}

.ql-font-helvetica {
    font-family: "Helvetica", Arial, sans-serif !important;
}

.ql-font-palatino {
    font-family: "Palatino", "Book Antiqua", serif !important;
}

.ql-font-arial {
    font-family: "Arial", Helvetica, sans-serif !important;
}

.ql-font-courier {
    font-family: "Courier", "Courier New", monospace !important;
}

.ql-font-monaco {
    font-family: "Monaco", "Monaco", monospace !important;
}

/* Ensure editor visibility */
div#writing-section div#editor-container {
    min-height: 300px !important;
    display: block !important;
    visibility: visible !important;
    border: 1px solid #ccc !important;
}

div#writing-section div#editor-container .ql-container {
    min-height: 250px !important;
    display: block !important;
    visibility: visible !important;
    border: 1px solid #ddd !important;
}

div#writing-section div#editor-container .ql-editor {
    min-height: 250px !important;
    display: block !important;
    visibility: visible !important;
    padding: 10px !important;
    background: #fff !important;
}

/* Ensure toolbar and dropdown are visible */
div#writing-section div#editor-container .ql-toolbar.ql-snow {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    background: #f8f8f8 !important;
    border: 1px solid #ccc !important;
    border-bottom: none !important;
}

div#writing-section div#editor-container .ql-toolbar .ql-formats {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
