/* frontend/css/checklist-editor.css */
.checklist-editor-container {
    animation: fadeIn 0.3s ease;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.editor-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.checklist-info-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.editable-tree {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.editable-node {
    margin-left: 0;
    list-style: none;
}

.editable-node-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.editable-node-content:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
}

.editable-node-content.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.editable-node-content .toggle-icon {
    width: 20px;
    cursor: pointer;
    color: var(--text-gray);
    flex-shrink: 0;
}

.editable-node-content .node-icon {
    width: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.editable-node-content .node-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
}

.editable-node-content .node-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 8px;
}

.editable-node-content .node-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg-gray);
    color: var(--text-gray);
    flex-shrink: 0;
}

.editable-node-content .node-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.editable-node-content:hover .node-actions {
    opacity: 1;
}

.node-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s;
}

.node-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.node-action-btn.danger:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

.editable-node-children {
    margin-left: 32px;
    display: none;
}

.editable-node-children.expanded {
    display: block;
}

/* Стили для файлов */
.attachments-list {
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 8px;
}

.attachment-item:hover {
    background: var(--border-color);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.attachment-info i {
    color: var(--primary-color);
    font-size: 18px;
}

.attachment-name {
    font-size: 13px;
    color: var(--text-dark);
}

.attachment-size {
    font-size: 11px;
    color: var(--text-gray);
}

.delete-attachment {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 4px 8px;
    border-radius: 4px;
}

.delete-attachment:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

.file-upload-area-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
}

.file-upload-area-small:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.file-upload-area-small i {
    font-size: 18px;
    color: var(--primary-color);
}

/* frontend/css/checklist-editor.css - добавьте в конец файла */

/* Стили для индикатора файлов */
.attachment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.attachment-indicator i {
    font-size: 10px;
}

/* Модальное окно файлов */
.attachments-list-modal {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.attachment-item:hover {
    background: var(--border-color);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attachment-info i {
    font-size: 24px;
    color: var(--primary-color);
}

.attachment-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 13px;
}

.attachment-size {
    font-size: 11px;
    color: var(--text-gray);
}

.attachment-date {
    font-size: 10px;
    color: var(--text-light);
}

.attachment-actions {
    display: flex;
    gap: 8px;
}

.attachment-actions button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-gray);
}

.attachment-actions button:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.attachment-actions .delete-attachment:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.file-upload-area i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.file-upload-area p {
    margin: 0;
    font-size: 13px;
    color: var(--text-gray);
}

.file-upload-area-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
    margin-top: 8px;
}

.file-upload-area-small:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.file-upload-area-small i {
    font-size: 18px;
    color: var(--primary-color);
}

.empty-state-small {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-size: 13px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}