/* Custom styling for Quill editor */

/* Editor container */
.quill-editor {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Toolbar styling */
.ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px 4px 0 0;
}

/* Toolbar buttons */
.ql-toolbar .ql-stroke {
    stroke: #444;
}

.ql-toolbar .ql-fill {
    fill: #444;
}

.ql-toolbar button:hover,
.ql-toolbar button:focus,
.ql-toolbar button.ql-active {
    color: #73ab89;
}

.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button:focus .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke {
    stroke: #73ab89;
}

.ql-toolbar button:hover .ql-fill,
.ql-toolbar button:focus .ql-fill,
.ql-toolbar button.ql-active .ql-fill {
    fill: #73ab89;
}

/* Editor content area */
.ql-container.ql-snow {
    border: none;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.ql-editor {
    padding: 15px;
    min-height: 300px;
    color: #333;
}

.ql-editor.ql-blank::before {
    color: #999;
    font-style: italic;
}

.ql-editor:focus {
    outline: none;
}

/* Make sure all toolbar icons are visible */
.ql-toolbar button {
    width: 28px;
    height: 24px;
    display: inline-block;
    cursor: pointer;
}

/* Dropdown styling */
.ql-snow .ql-picker {
    color: #444;
    height: 24px;
}

.ql-snow .ql-picker-label {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 8px;
}

.ql-snow .ql-picker-label:hover {
    color: #73ab89;
    border-color: #73ab89;
}

.ql-snow .ql-picker-options {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 5px;
}

.ql-snow .ql-picker-item:hover {
    color: #73ab89;
}

/* Color picker */
.ql-snow .ql-color-picker .ql-picker-options {
    padding: 5px 5px 0px 5px;
    width: 152px;
}

/* Active button styling */
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active {
    background: rgba(115, 171, 137, 0.1);
    border-radius: 3px;
}

/* Form group spacing */
.form-group .quill-editor {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ql-toolbar.ql-snow {
        padding: 5px;
    }
    
    .ql-toolbar button {
        width: 24px;
        height: 22px;
    }
    
    .ql-editor {
        padding: 10px;
        min-height: 200px;
    }
}

/* Ensure editor is visible */
.quill-editor {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Loading state */
.quill-editor.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Headers in editor */
.ql-editor h1 {
    font-size: 2em;
    font-weight: bold;
    margin: 0.67em 0;
}

.ql-editor h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0.75em 0;
}

.ql-editor h3 {
    font-size: 1.17em;
    font-weight: bold;
    margin: 0.83em 0;
}

/* Lists */
.ql-editor ul,
.ql-editor ol {
    padding-left: 1.5em;
}

/* Links */
.ql-editor a {
    color: #73ab89;
    text-decoration: underline;
}

/* Images */
.ql-editor img {
    max-width: 100%;
    height: auto;
}

/* Code blocks */
.ql-editor pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    overflow-x: auto;
}

/* Blockquotes */
.ql-editor blockquote {
    border-left: 4px solid #73ab89;
    padding-left: 16px;
    margin: 10px 0;
    color: #666;
}
