/* Custom Rich Text Editor Styles */

.custom-editor-wrapper {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 10px;
}

.custom-editor-toolbar {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    flex-wrap: wrap;
    gap: 4px;
}

.toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.toolbar-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.toolbar-btn strong {
    font-weight: bold;
}

.toolbar-btn em {
    font-style: italic;
}

.toolbar-btn u {
    text-decoration: underline;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #dee2e6;
    margin: 0 4px;
}

.toolbar-select {
    height: 32px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    background: #fff;
    padding: 0 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.toolbar-select:focus {
    outline: none;
    border-color: #007bff;
}

.toolbar-color-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.toolbar-color-wrap:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.toolbar-color-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.toolbar-color {
    width: 28px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.custom-editor-content {
    min-height: 200px;
    padding: 12px;
    outline: none;
    overflow-y: auto;
    max-height: 500px;
    line-height: 1.6;
    font-family: inherit;
    font-size: 14px;
    color: #333;
}

.custom-editor-content:focus {
    outline: none;
}

.custom-editor-content.empty:before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

.custom-editor-content p {
    margin: 0 0 8px 0;
}

.custom-editor-content ul,
.custom-editor-content ol {
    margin: 8px 0;
    padding-left: 30px;
}

.custom-editor-content li {
    margin: 4px 0;
}

.custom-editor-content img {
    max-width: 100%;
    height: auto;
}

.custom-editor-content blockquote {
    border-left: 4px solid #dee2e6;
    margin: 8px 0;
    padding: 6px 10px;
    color: #555;
    background: #fafafa;
}

.custom-editor-content pre {
    background: #0b1020;
    color: #e6e6e6;
    padding: 10px;
    border-radius: 6px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.custom-editor-content code {
    background: #f1f3f5;
    padding: 0 4px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95em;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-editor-toolbar {
        padding: 6px;
    }
    
    .toolbar-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 28px;
        height: 28px;
    }

    .toolbar-select {
        height: 28px;
        font-size: 12px;
        padding: 0 6px;
    }
    
    .toolbar-color-wrap {
        height: 28px;
    }
    
    .custom-editor-content {
        min-height: 150px;
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

