/* css/editor.css - РЕДАКТОР СТАТЕЙ */
.editor-container {
    background-color: var(--light-color);
    border: 2px solid var(--gray);
    padding: 30px;
    margin-top: 20px;
    border-radius: 8px;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray);
    align-items: center;
}

.toolbar-btn {
    background-color: var(--light-gray);
    border: 2px solid var(--gray);
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    justify-content: center;
    border-radius: 4px;
}

.toolbar-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.toolbar-btn.active {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.3);
}

.editor-content {
    min-height: 400px;
    padding: 20px;
    border: 2px solid var(--gray);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    background-color: var(--light-color);
    border-radius: 4px;
    margin-bottom: 20px;
}

.editor-content:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.editor-content h1 {
    font-size: 28px;
    margin: 25px 0 18px 0;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray);
}

.editor-content h2 {
    font-size: 24px;
    margin: 22px 0 16px 0;
    color: var(--secondary-color);
}

.editor-content h3 {
    font-size: 20px;
    margin: 20px 0 14px 0;
    color: var(--secondary-color);
}

.editor-content p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.editor-content ul, .editor-content ol {
    margin-left: 30px;
    margin-bottom: 16px;
}

.editor-content li {
    margin-bottom: 8px;
}

.editor-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.editor-content a:hover {
    border-bottom-color: var(--primary-color);
}

.editor-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin-left: 0;
    margin-bottom: 20px;
    color: #666;
    font-style: italic;
}

.editor-content pre {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--gray);
}

.editor-content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid #e9ecef;
}

.editor-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--gray);
}

.editor-main-actions {
    display: flex;
    gap: 15px;
}

.editor-secondary-actions {
    display: flex;
    gap: 10px;
}

/* Theme Management in Editor */
.editor-theme-management {
    background-color: var(--light-gray);
    border: 2px solid var(--gray);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.editor-theme-management h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.theme-management-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.theme-list-editor {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--gray);
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 4px;
}

.theme-item-editor {
    padding: 12px;
    margin: 8px 0;
    background-color: var(--light-gray);
    border: 1px solid var(--gray);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.theme-item-editor:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.theme-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-level {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.theme-item-actions {
    display: flex;
    gap: 8px;
}

/* Link Dialog */
.link-dialog {
    background-color: var(--light-color);
    border: 2px solid var(--gray);
    padding: 25px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.link-dialog h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 20px;
}

.link-form-group {
    margin-bottom: 20px;
}

.link-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 15px;
}

.link-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    border-radius: 4px;
    transition: var(--transition);
}

.link-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.link-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}

/* Article List in Editor */
.article-list-editor {
    background-color: var(--light-gray);
    border: 2px solid var(--gray);
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
}

.article-list-editor h3 {
    margin-bottom: 20px;
}

.article-list-items {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray);
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 4px;
}

.article-list-item {
    padding: 15px;
    margin: 10px 0;
    background-color: var(--light-gray);
    border: 1px solid var(--gray);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.article-list-item:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.article-list-item-info h4 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.article-list-item-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 15px;
}

.article-list-item-actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.editor-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.editor-empty-state i {
    font-size: 48px;
    color: var(--gray);
    margin-bottom: 20px;
    display: block;
}

.editor-empty-state h4 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* Status Indicators */
.editor-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.editor-status.saving {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

.editor-status.saved {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.editor-status.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

/* Responsive Editor */
@media (max-width: 768px) {
    .editor-container {
        padding: 20px;
    }
    
    .editor-toolbar {
        gap: 6px;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
        height: 36px;
    }
    
    .editor-content {
        min-height: 300px;
        padding: 15px;
        font-size: 15px;
    }
    
    .editor-actions {
        flex-direction: column;
    }
    
    .editor-main-actions,
    .editor-secondary-actions {
        width: 100%;
        justify-content: center;
    }
    
    .theme-management-actions {
        flex-direction: column;
    }
    
    .theme-management-actions .btn {
        width: 100%;
    }
    
    .theme-item-editor {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .theme-item-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .article-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-list-item-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .editor-content {
        background-color: #1a1a1a;
        color: #f0f0f0;
        border-color: #444;
    }
    
    .editor-toolbar {
        background-color: #2a2a2a;
        border-color: #444;
    }
    
    .toolbar-btn {
        background-color: #333;
        border-color: #444;
        color: #f0f0f0;
    }
    
    .toolbar-btn:hover,
    .toolbar-btn.active {
        background-color: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
    
    .editor-content pre,
    .editor-content code {
        background-color: #2a2a2a;
        border-color: #444;
        color: #f0f0f0;
    }
}