/* Editor Styles */
.editor-container,
.article-editor-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.editor-toolbar,
.article-editor-toolbar {
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-toolbar-group,
.article-editor-toolbar-group {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.editor-btn,
.article-editor-btn {
    background-color: var(--white);
    border: none;
    border-right: 1px solid var(--border-color);
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-medium);
}

.editor-btn:last-child,
.article-editor-btn:last-child {
    border-right: none;
}

.editor-btn:hover,
.article-editor-btn:hover {
    background-color: var(--primary-transparent);
    color: var(--primary);
}

.editor-btn.active,
.article-editor-btn.active {
    background-color: var(--primary-transparent);
    color: var(--primary);
}

.editor-content,
.article-editor-content {
    min-height: 300px;
    padding: 15px;
    overflow: auto;
    outline: none;
    background-color: var(--white);
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-editor-format {
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    background-color: #f8f8f8;
    color: var(--text-medium);
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.article-editor-format:hover,
.article-editor-format:focus {
    border-color: var(--primary);
    background-color: var(--primary-transparent);
}

/* Content styling in the editor */
.article-editor-content p {
    margin: 0 0 1em 0;
}

.article-editor-content h1, 
.article-editor-content h2, 
.article-editor-content h3, 
.article-editor-content h4, 
.article-editor-content h5, 
.article-editor-content h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 1em 0 0.5em 0;
    color: #333;
}

.article-editor-content h1 { font-size: 24px; }
.article-editor-content h2 { font-size: 22px; }
.article-editor-content h3 { font-size: 20px; }
.article-editor-content h4 { font-size: 18px; }
.article-editor-content h5 { font-size: 16px; }
.article-editor-content h6 { font-size: 14px; }

.article-editor-content blockquote {
    border-left: 3px solid #ccc;
    background-color: #f5f5f5;
    margin: 1em 0;
    padding: 10px 15px;
    color: #333;
}

.article-editor-content ul, 
.article-editor-content ol {
    margin-bottom: 1em;
    padding-left: 25px;
}

.article-editor-content a {
    color: var(--primary);
    text-decoration: underline;
}

.article-editor-content a:hover {
    text-decoration: none;
}

.article-editor-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border: 1px solid #ddd;
    padding: 2px;
}

.article-editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.article-editor-content th,
.article-editor-content td {
    border: 1px solid #ddd;
    padding: 8px;
}

.article-editor-content th {
    background-color: #f0f0f0;
    font-weight: 600;
    text-align: left;
}

.article-editor-content tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Placeholder styling */
[contenteditable=true]:empty:before {
    content: attr(placeholder);
    color: #999;
    display: block;
}

@media (max-width: 768px) {
    .editor-toolbar-group {
        margin-bottom: 5px;
    }
    
    .editor-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}